From 766520b851bbadf325a73139a1643c4d050db4a0 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Wed, 10 May 2017 23:04:19 +0200 Subject: [PATCH] Renamed DownloadClientStatus to DownloadClientInfo to avoid conflict. --- .../Download/Clients/Blackhole/TorrentBlackhole.cs | 4 ++-- .../Download/Clients/Blackhole/UsenetBlackhole.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs | 4 ++-- .../Clients/DownloadStation/TorrentDownloadStation.cs | 4 ++-- .../Clients/DownloadStation/UsenetDownloadStation.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs | 4 ++-- .../Download/Clients/QBittorrent/QBittorrent.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs | 4 ++-- .../Download/Clients/Transmission/TransmissionBase.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs | 4 ++-- src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs | 4 ++-- src/NzbDrone.Core/Download/DownloadClientBase.cs | 2 +- .../{DownloadClientStatus.cs => DownloadClientInfo.cs} | 2 +- src/NzbDrone.Core/Download/IDownloadClient.cs | 2 +- .../HealthCheck/Checks/ImportMechanismCheck.cs | 2 +- src/NzbDrone.Core/NzbDrone.Core.csproj | 6 ++---- 19 files changed, 34 insertions(+), 36 deletions(-) rename src/NzbDrone.Core/Download/{DownloadClientStatus.cs => DownloadClientInfo.cs} (85%) diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs index 260304ed6..eb8034fa0 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackhole.cs @@ -119,9 +119,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole DeleteItemData(downloadId); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = true, OutputRootFolders = new List { new OsPath(Settings.WatchFolder) } diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs index 31cefcb90..2a043c3cf 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackhole.cs @@ -86,9 +86,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole DeleteItemData(downloadId); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = true, OutputRootFolders = new List { new OsPath(Settings.WatchFolder) } diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 7bd224472..b468c80bc 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -151,7 +151,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge _proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); @@ -162,7 +162,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge destDir = new OsPath(config.GetValueOrDefault("move_completed_path") as string); } - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs index 75c990276..310d4e120 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs @@ -105,13 +105,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation return items; } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { try { var path = GetDownloadDirectory(); - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", OutputRootFolders = new List { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) } diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs index ed24e2443..9d305c839 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs @@ -130,13 +130,13 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation return finalPath; } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { try { var path = GetDownloadDirectory(); - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", OutputRootFolders = new List { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(path)) } diff --git a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs index 17041c51c..d4e19cc51 100644 --- a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs +++ b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs @@ -117,12 +117,12 @@ namespace NzbDrone.Core.Download.Clients.Hadouken } } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); var destDir = new OsPath(config.GetValueOrDefault("bittorrent.defaultSavePath") as string); - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs index fb025ae82..8e223cffd 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs @@ -142,9 +142,9 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex return _proxy.GetGroups(Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs index ed9cd5cd6..f80348132 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs @@ -214,13 +214,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget _proxy.RemoveItem(downloadId, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); var category = GetCategories(config).FirstOrDefault(v => v.Name == Settings.TvCategory); - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs index 618a1e843..c2ca17a63 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs @@ -103,9 +103,9 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic throw new NotSupportedException(); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = true }; diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index 148c8292a..cbcc55656 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -174,13 +174,13 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent _proxy.RemoveTorrent(hash.ToLower(), deleteData, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); var destDir = new OsPath(config.SavePath); - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", OutputRootFolders = new List { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, destDir) } diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index e42c2f695..ff3b9b907 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -250,7 +250,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); var categories = GetCategories(config).ToArray(); @@ -262,7 +262,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd category = categories.FirstOrDefault(v => v.Name == "*"); } - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs index d9c956194..a5eaf08cd 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs @@ -119,7 +119,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission _proxy.RemoveTorrent(downloadId.ToLower(), deleteData, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); var destDir = config.GetValueOrDefault("download-dir") as string; @@ -129,7 +129,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission destDir = string.Format("{0}/.{1}", destDir, Settings.TvCategory); } - return new DownloadClientStatus + return new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost", OutputRootFolders = new List { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(destDir)) } diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs index 5ea9015a7..4af1c0797 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs @@ -156,11 +156,11 @@ namespace NzbDrone.Core.Download.Clients.RTorrent _proxy.RemoveTorrent(downloadId, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { // XXX: This function's correctness has not been considered - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs index 1c9f88990..b2574e8b5 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs @@ -178,7 +178,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent _proxy.RemoveTorrent(downloadId, deleteData, Settings); } - public override DownloadClientStatus GetStatus() + public override DownloadClientInfo GetStatus() { var config = _proxy.GetConfig(Settings); @@ -199,7 +199,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } } - var status = new DownloadClientStatus + var status = new DownloadClientInfo { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; diff --git a/src/NzbDrone.Core/Download/DownloadClientBase.cs b/src/NzbDrone.Core/Download/DownloadClientBase.cs index 69c68bff3..713935a4c 100644 --- a/src/NzbDrone.Core/Download/DownloadClientBase.cs +++ b/src/NzbDrone.Core/Download/DownloadClientBase.cs @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Download public abstract string Download(RemoteEpisode remoteEpisode); public abstract IEnumerable GetItems(); public abstract void RemoveItem(string downloadId, bool deleteData); - public abstract DownloadClientStatus GetStatus(); + public abstract DownloadClientInfo GetStatus(); protected virtual void DeleteItemData(string downloadId) { diff --git a/src/NzbDrone.Core/Download/DownloadClientStatus.cs b/src/NzbDrone.Core/Download/DownloadClientInfo.cs similarity index 85% rename from src/NzbDrone.Core/Download/DownloadClientStatus.cs rename to src/NzbDrone.Core/Download/DownloadClientInfo.cs index a092fd8de..cf586ab64 100644 --- a/src/NzbDrone.Core/Download/DownloadClientStatus.cs +++ b/src/NzbDrone.Core/Download/DownloadClientInfo.cs @@ -3,7 +3,7 @@ using NzbDrone.Common.Disk; namespace NzbDrone.Core.Download { - public class DownloadClientStatus + public class DownloadClientInfo { public bool IsLocalhost { get; set; } public List OutputRootFolders { get; set; } diff --git a/src/NzbDrone.Core/Download/IDownloadClient.cs b/src/NzbDrone.Core/Download/IDownloadClient.cs index 6703d8a22..4b09535af 100644 --- a/src/NzbDrone.Core/Download/IDownloadClient.cs +++ b/src/NzbDrone.Core/Download/IDownloadClient.cs @@ -12,6 +12,6 @@ namespace NzbDrone.Core.Download string Download(RemoteEpisode remoteEpisode); IEnumerable GetItems(); void RemoveItem(string downloadId, bool deleteData); - DownloadClientStatus GetStatus(); + DownloadClientInfo GetStatus(); } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs index ec35653c7..2fb2d3e2d 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/ImportMechanismCheck.cs @@ -91,6 +91,6 @@ namespace NzbDrone.Core.HealthCheck.Checks public class ImportMechanismCheckStatus { public IDownloadClient DownloadClient { get; set; } - public DownloadClientStatus Status { get; set; } + public DownloadClientInfo Status { get; set; } } } diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 73b441b72..62f7edd61 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -412,9 +412,7 @@ - - Code - + @@ -510,7 +508,7 @@ - +