Pull Sonarr commit 'Fixed: Removing completed download from SABnzbd'

(cherry picked from c669be317fffa252d59851e9a8ca9e56032a01fb)
This commit is contained in:
Mark McDowall
2021-04-19 22:00:33 -07:00
committed by ta264
parent 5fff24bf69
commit 0ffc44f3da
25 changed files with 96 additions and 99 deletions
@@ -4,7 +4,6 @@ using System.Linq;
using FluentValidation.Results;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Parser.Model;
@@ -68,20 +67,13 @@ namespace NzbDrone.Core.Download
return item;
}
public abstract void RemoveItem(string downloadId, bool deleteData);
public abstract void RemoveItem(DownloadClientItem item, bool deleteData);
public abstract DownloadClientInfo GetStatus();
protected virtual void DeleteItemData(string downloadId)
protected virtual void DeleteItemData(DownloadClientItem item)
{
if (downloadId.IsNullOrWhiteSpace())
{
return;
}
var item = GetItems().FirstOrDefault(v => v.DownloadId == downloadId);
if (item == null)
{
_logger.Trace("DownloadItem {0} in {1} history not found, skipping delete data.", downloadId, Name);
return;
}