mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
SabProvider now gets JSON instead of XML for history and queue.
This commit is contained in:
@@ -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
-2
@@ -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; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
namespace NzbDrone.Core.Model
|
||||
namespace NzbDrone.Core.Model.Sabnzbd
|
||||
{
|
||||
public enum SabnzbdPriorityType
|
||||
public enum SabPriorityType
|
||||
{
|
||||
Default = -100,
|
||||
Paused = -2,
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user