2019-03-03 18:24:01 +00:00
|
|
|
using System.Numerics;
|
2018-04-29 11:05:43 +00:00
|
|
|
using Newtonsoft.Json;
|
2015-09-03 04:28:08 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|
|
|
{
|
|
|
|
// torrent properties from the list returned by /query/torrents
|
|
|
|
public class QBittorrentTorrent
|
|
|
|
{
|
|
|
|
public string Hash { get; set; } // Torrent hash
|
|
|
|
|
|
|
|
public string Name { get; set; } // Torrent name
|
|
|
|
|
|
|
|
public long Size { get; set; } // Torrent size (bytes)
|
|
|
|
|
|
|
|
public double Progress { get; set; } // Torrent progress (%/100)
|
|
|
|
|
2018-04-29 11:05:43 +00:00
|
|
|
public BigInteger Eta { get; set; } // Torrent ETA (seconds) (QBit contains a bug exceeding ulong limits)
|
2015-09-03 04:28:08 +00:00
|
|
|
|
|
|
|
public string State { get; set; } // Torrent state. See possible values here below
|
|
|
|
|
|
|
|
public string Label { get; set; } // Label of the torrent
|
2016-12-14 07:32:34 +00:00
|
|
|
public string Category { get; set; } // Category of the torrent (3.3.5+)
|
2015-09-03 04:28:08 +00:00
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "save_path")]
|
|
|
|
public string SavePath { get; set; } // Torrent save path
|
2016-10-28 03:07:42 +00:00
|
|
|
|
2020-11-13 22:15:58 +00:00
|
|
|
[JsonProperty(PropertyName = "content_path")]
|
|
|
|
public string ContentPath { get; set; } // Torrent save path
|
|
|
|
|
2016-10-28 03:07:42 +00:00
|
|
|
public float Ratio { get; set; } // Torrent share ratio
|
2019-03-03 18:24:01 +00:00
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "ratio_limit")] // Per torrent seeding ratio limit (-2 = use global, -1 = unlimited)
|
|
|
|
public float RatioLimit { get; set; } = -2;
|
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "seeding_time")]
|
2023-09-08 00:12:20 +00:00
|
|
|
public long? SeedingTime { get; set; } // Torrent seeding time (in seconds, not provided by the list api)
|
2019-03-03 18:24:01 +00:00
|
|
|
|
|
|
|
[JsonProperty(PropertyName = "seeding_time_limit")] // Per torrent seeding time limit (-2 = use global, -1 = unlimited)
|
|
|
|
public long SeedingTimeLimit { get; set; } = -2;
|
2019-03-23 21:40:03 +00:00
|
|
|
}
|
2019-03-03 18:24:01 +00:00
|
|
|
|
2019-03-23 21:40:03 +00:00
|
|
|
public class QBittorrentTorrentProperties
|
|
|
|
{
|
|
|
|
public string Hash { get; set; } // Torrent hash
|
|
|
|
|
2020-11-13 22:15:58 +00:00
|
|
|
[JsonProperty(PropertyName = "save_path")]
|
|
|
|
public string SavePath { get; set; }
|
|
|
|
|
2019-03-23 21:40:03 +00:00
|
|
|
[JsonProperty(PropertyName = "seeding_time")]
|
2023-09-08 00:12:20 +00:00
|
|
|
public long SeedingTime { get; set; } // Torrent seeding time (in seconds)
|
2015-09-03 04:28:08 +00:00
|
|
|
}
|
2020-11-13 22:15:58 +00:00
|
|
|
|
|
|
|
public class QBittorrentTorrentFile
|
|
|
|
{
|
|
|
|
public string Name { get; set; }
|
|
|
|
}
|
2015-09-03 04:28:08 +00:00
|
|
|
}
|