From 5827644300c38cbc3cdc5c72e1a8e7895ca2e792 Mon Sep 17 00:00:00 2001 From: ta264 Date: Wed, 15 Dec 2021 21:40:52 +0000 Subject: [PATCH] Fixed: Error getting seed config for rtorrent --- src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs | 2 +- src/NzbDrone.Core/Download/DownloadSeedConfigProvider.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs index 8d6560697..313600955 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs @@ -175,7 +175,7 @@ public override IEnumerable GetItems() // Check if torrent is finished and if it exceeds cached seedConfig item.CanMoveFiles = item.CanBeRemoved = - torrent.IsFinished && + torrent.IsFinished && seedConfig != null && ((torrent.Ratio / 1000.0) >= seedConfig.Ratio || (DateTimeOffset.Now - DateTimeOffset.FromUnixTimeSeconds(torrent.FinishedTime)) >= seedConfig.SeedTime); diff --git a/src/NzbDrone.Core/Download/DownloadSeedConfigProvider.cs b/src/NzbDrone.Core/Download/DownloadSeedConfigProvider.cs index eb8a41226..a8a1168e5 100644 --- a/src/NzbDrone.Core/Download/DownloadSeedConfigProvider.cs +++ b/src/NzbDrone.Core/Download/DownloadSeedConfigProvider.cs @@ -71,7 +71,7 @@ private CachedSeedConfiguration FetchIndexer(string infoHash) } ParsedBookInfo parsedBookInfo = null; - if (historyItem.SourceTitle != null) + if (historyItem.Release != null) { parsedBookInfo = Parser.Parser.ParseBookTitle(historyItem.Release.Title); }