mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Pull Sonarr commit 'Fixed: Removing completed download from SABnzbd'
(cherry picked from c669be317fffa252d59851e9a8ca9e56032a01fb)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user