From 3cada6d0699d875012b24449ac5a65bf7e87393a Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 29 Oct 2017 21:43:23 -0400 Subject: [PATCH] Fixed: Long Deluge ETAs from breaking getting queue items --- src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 3fd4985f4..c0636cdd0 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -109,7 +109,16 @@ namespace NzbDrone.Core.Download.Clients.Deluge var outputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(torrent.DownloadPath)); item.OutputPath = outputPath + torrent.Name; 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; if (torrent.State == DelugeTorrentStatus.Error)