2012-01-19 04:05:03 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Newtonsoft.Json;
|
2013-04-07 17:58:58 +00:00
|
|
|
|
using NzbDrone.Core.Download.Clients.Sabnzbd.JsonConverters;
|
2013-03-05 05:33:34 +00:00
|
|
|
|
using NzbDrone.Core.Model;
|
2012-01-19 04:05:03 +00:00
|
|
|
|
|
2013-03-05 05:33:34 +00:00
|
|
|
|
namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
2012-01-19 04:05:03 +00:00
|
|
|
|
{
|
|
|
|
|
public class SabQueueItem
|
|
|
|
|
{
|
|
|
|
|
public string Status { get; set; }
|
|
|
|
|
public int Index { get; set; }
|
2012-01-30 21:34:15 +00:00
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(SabnzbdQueueTimeConverter))]
|
2012-01-19 04:05:03 +00:00
|
|
|
|
public TimeSpan Timeleft { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "mb")]
|
|
|
|
|
public decimal Size { get; set; }
|
|
|
|
|
|
2012-01-20 05:37:08 +00:00
|
|
|
|
private string _title;
|
|
|
|
|
|
2012-01-19 04:05:03 +00:00
|
|
|
|
[JsonProperty(PropertyName = "filename")]
|
2012-01-20 05:37:08 +00:00
|
|
|
|
public string Title
|
|
|
|
|
{
|
|
|
|
|
get { return _title; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_title = value;
|
2013-04-07 19:01:24 +00:00
|
|
|
|
ParseResult = Parser.ParseTitle<ParseResult>(value.Replace("DUPLICATE / ", String.Empty));
|
2012-01-20 05:37:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2012-01-19 04:05:03 +00:00
|
|
|
|
|
2012-05-19 20:07:30 +00:00
|
|
|
|
[JsonConverter(typeof(SabnzbdPriorityTypeConverter))]
|
2012-01-19 04:05:03 +00:00
|
|
|
|
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; }
|
2012-01-20 05:37:08 +00:00
|
|
|
|
|
2013-04-07 19:01:24 +00:00
|
|
|
|
public ParseResult ParseResult { private set; get; }
|
2012-01-19 04:05:03 +00:00
|
|
|
|
}
|
|
|
|
|
}
|