mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
SabProvider now gets JSON instead of XML for history and queue.
This commit is contained in:
parent
26c4240a6b
commit
b4eed1a657
25 changed files with 503 additions and 6505 deletions
|
@ -1,13 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
public class SabQueueItem
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
|
@ -2,9 +2,9 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabnzbdCategoryModel
|
||||
public class SabCategoryModel
|
||||
{
|
||||
public List<string> categories { get; set; }
|
||||
}
|
16
NzbDrone.Core/Model/Sabnzbd/SabHistory.cs
Normal file
16
NzbDrone.Core/Model/Sabnzbd/SabHistory.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabHistory
|
||||
{
|
||||
public bool Paused { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "slots")]
|
||||
public List<SabHistoryItem> Items { get; set; }
|
||||
}
|
||||
}
|
32
NzbDrone.Core/Model/Sabnzbd/SabHistoryItem.cs
Normal file
32
NzbDrone.Core/Model/Sabnzbd/SabHistoryItem.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabHistoryItem
|
||||
{
|
||||
[JsonProperty(PropertyName = "fail_message")]
|
||||
public string FailMessage { get; set; }
|
||||
|
||||
public string Size { get; set; }
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "nzb_name")]
|
||||
public string NzbName { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "download_time")]
|
||||
public int DownloadTime { get; set; }
|
||||
|
||||
public string Storage { get; set; }
|
||||
public string Status { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "nzo_id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
14
NzbDrone.Core/Model/Sabnzbd/SabJsonError.cs
Normal file
14
NzbDrone.Core/Model/Sabnzbd/SabJsonError.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabJsonError
|
||||
{
|
||||
public string Status { get; set; }
|
||||
public string Error { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace NzbDrone.Core.Model
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabnzbdInfoModel
|
||||
public class SabModel
|
||||
{
|
||||
public string Host { get; set; }
|
||||
public int Port { get; set; }
|
|
@ -1,6 +1,6 @@
|
|||
namespace NzbDrone.Core.Model
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public enum SabnzbdPriorityType
|
||||
public enum SabPriorityType
|
||||
{
|
||||
Default = -100,
|
||||
Paused = -2,
|
16
NzbDrone.Core/Model/Sabnzbd/SabQueue.cs
Normal file
16
NzbDrone.Core/Model/Sabnzbd/SabQueue.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabQueue
|
||||
{
|
||||
public bool Paused { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "slots")]
|
||||
public List<SabQueueItem> Items { get; set; }
|
||||
}
|
||||
}
|
34
NzbDrone.Core/Model/Sabnzbd/SabQueueItem.cs
Normal file
34
NzbDrone.Core/Model/Sabnzbd/SabQueueItem.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public class SabQueueItem
|
||||
{
|
||||
public string Status { get; set; }
|
||||
public int Index { get; set; }
|
||||
public TimeSpan Timeleft { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "mb")]
|
||||
public decimal Size { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "filename")]
|
||||
public string Title { get; set; }
|
||||
|
||||
public SabPriorityType Priority { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "cat")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "mbleft")]
|
||||
public decimal SizeLeft { get; set; }
|
||||
|
||||
public int Percentage { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "nzo_id")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue