From dadf6708ab0a801a03d730536dd1ef92b312e72b Mon Sep 17 00:00:00 2001 From: Marcelo Castagna Date: Tue, 14 Feb 2017 11:29:47 -0300 Subject: [PATCH] Handle download data diskstation (#744) * Delete data manually after finished seeding * Removed try/catch --- .../Clients/DownloadStation/DownloadStation.cs | 13 +++++-------- .../DownloadStation/Proxies/DownloadStationProxy.cs | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStation.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStation.cs index 579b3fe04..d09af800a 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStation.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStation.cs @@ -117,16 +117,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation public override void RemoveItem(string downloadId, bool deleteData) { - try + if (deleteData) { - _proxy.RemoveTorrent(ParseDownloadId(downloadId), deleteData, Settings); - _logger.Debug("{0} removed correctly", downloadId); - return; - } - catch (DownloadClientException e) - { - _logger.Error(e); + DeleteItemData(downloadId); } + + _proxy.RemoveTorrent(ParseDownloadId(downloadId), Settings); + _logger.Debug("{0} removed correctly", downloadId); } protected OsPath GetOutputPath(OsPath outputPath, DownloadStationTorrent torrent, string serialNumber) diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/DownloadStationProxy.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/DownloadStationProxy.cs index 8da818408..bf14d1899 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/DownloadStationProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/DownloadStationProxy.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation.Proxies { IEnumerable GetTorrents(DownloadStationSettings settings); Dictionary GetConfig(DownloadStationSettings settings); - void RemoveTorrent(string downloadId, bool deleteData, DownloadStationSettings settings); + void RemoveTorrent(string downloadId, DownloadStationSettings settings); void AddTorrentFromUrl(string url, string downloadDirectory, DownloadStationSettings settings); void AddTorrentFromData(byte[] torrentData, string filename, string downloadDirectory, DownloadStationSettings settings); IEnumerable GetApiVersion(DownloadStationSettings settings); @@ -99,7 +99,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation.Proxies return response.Data; } - public void RemoveTorrent(string downloadId, bool deleteData, DownloadStationSettings settings) + public void RemoveTorrent(string downloadId, DownloadStationSettings settings) { var arguments = new Dictionary {