Fixed: Calculating seed time for qBittorrent
This commit is contained in:
parent
0128dca5ac
commit
1b3ff64cc5
|
@ -634,7 +634,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
||||||
.Returns(new QBittorrentTorrentProperties
|
.Returns(new QBittorrentTorrentProperties
|
||||||
{
|
{
|
||||||
Hash = "HASH",
|
Hash = "HASH",
|
||||||
SeedingTime = seedingTime
|
SeedingTime = seedingTime * 60
|
||||||
});
|
});
|
||||||
|
|
||||||
return torrent;
|
return torrent;
|
||||||
|
|
|
@ -626,11 +626,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
|
|
||||||
if (torrent.SeedingTimeLimit >= 0)
|
if (torrent.SeedingTimeLimit >= 0)
|
||||||
{
|
{
|
||||||
seedingTimeLimit = torrent.SeedingTimeLimit;
|
seedingTimeLimit = torrent.SeedingTimeLimit * 60;
|
||||||
}
|
}
|
||||||
else if (torrent.SeedingTimeLimit == -2 && config.MaxSeedingTimeEnabled)
|
else if (torrent.SeedingTimeLimit == -2 && config.MaxSeedingTimeEnabled)
|
||||||
{
|
{
|
||||||
seedingTimeLimit = config.MaxSeedingTime;
|
seedingTimeLimit = config.MaxSeedingTime * 60;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
public float RatioLimit { get; set; } = -2;
|
public float RatioLimit { get; set; } = -2;
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "seeding_time")]
|
[JsonProperty(PropertyName = "seeding_time")]
|
||||||
public long? SeedingTime { get; set; } // Torrent seeding time (not provided by the list api)
|
public long? SeedingTime { get; set; } // Torrent seeding time (in seconds, not provided by the list api)
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "seeding_time_limit")] // Per torrent seeding time limit (-2 = use global, -1 = unlimited)
|
[JsonProperty(PropertyName = "seeding_time_limit")] // Per torrent seeding time limit (-2 = use global, -1 = unlimited)
|
||||||
public long SeedingTimeLimit { get; set; } = -2;
|
public long SeedingTimeLimit { get; set; } = -2;
|
||||||
|
@ -47,7 +47,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||||
public string SavePath { get; set; }
|
public string SavePath { get; set; }
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "seeding_time")]
|
[JsonProperty(PropertyName = "seeding_time")]
|
||||||
public long SeedingTime { get; set; } // Torrent seeding time
|
public long SeedingTime { get; set; } // Torrent seeding time (in seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QBittorrentTorrentFile
|
public class QBittorrentTorrentFile
|
||||||
|
|
Loading…
Reference in New Issue