mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 09:37:12 +00:00
Fixed: Long Deluge ETAs from breaking getting queue items
This commit is contained in:
parent
899f12fd0c
commit
3cada6d069
1 changed files with 10 additions and 1 deletions
|
@ -109,7 +109,16 @@ public override IEnumerable<DownloadClientItem> GetItems()
|
||||||
var outputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(torrent.DownloadPath));
|
var outputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(torrent.DownloadPath));
|
||||||
item.OutputPath = outputPath + torrent.Name;
|
item.OutputPath = outputPath + torrent.Name;
|
||||||
item.RemainingSize = torrent.Size - torrent.BytesDownloaded;
|
item.RemainingSize = torrent.Size - torrent.BytesDownloaded;
|
||||||
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
|
try
|
||||||
|
{
|
||||||
|
item.RemainingTime = TimeSpan.FromSeconds(torrent.Eta);
|
||||||
|
}
|
||||||
|
catch (OverflowException ex)
|
||||||
|
{
|
||||||
|
_logger.Debug(ex, "ETA for {0} is too long: {1}", torrent.Name, torrent.Eta);
|
||||||
|
item.RemainingTime = TimeSpan.MaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
item.TotalSize = torrent.Size;
|
item.TotalSize = torrent.Size;
|
||||||
|
|
||||||
if (torrent.State == DelugeTorrentStatus.Error)
|
if (torrent.State == DelugeTorrentStatus.Error)
|
||||||
|
|
Loading…
Reference in a new issue