From a9d66133a699a1775337bdf6b20a005c8ebf6d17 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 17 Jul 2018 21:16:39 -0400 Subject: [PATCH] Fixed: Dowload client category validation messages not showing --- .../TorrentDownloadStationFixture.cs | 4 ++-- .../UsenetDownloadStationFixture.cs | 4 ++-- .../TransmissionTests/TransmissionFixture.cs | 6 +++--- .../TransmissionTests/TransmissionFixtureBase.cs | 6 +++--- .../DownloadClientTests/VuzeTests/VuzeFixture.cs | 6 +++--- src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs | 4 ++-- .../Download/Clients/NzbVortex/NzbVortex.cs | 2 +- src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs | 2 +- .../Download/Clients/QBittorrent/QBittorrent.cs | 2 +- src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs | 10 +++++----- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/TorrentDownloadStationFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/TorrentDownloadStationFixture.cs index b68ff1388..30f2a9bfd 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/TorrentDownloadStationFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/TorrentDownloadStationFixture.cs @@ -303,7 +303,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests .Returns(_serialNumber); } - protected void GivenTvCategory() + protected void GivenMusicCategory() { _settings.MusicCategory = _category; } @@ -389,7 +389,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests public void Download_with_category_should_force_directory() { GivenSerialNumber(); - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); var remoteEpisode = CreateRemoteAlbum(); diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/UsenetDownloadStationFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/UsenetDownloadStationFixture.cs index 0c870745d..80bfe20a6 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/UsenetDownloadStationFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadStationTests/UsenetDownloadStationFixture.cs @@ -196,7 +196,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests .Returns(_serialNumber); } - protected void GivenTvCategory() + protected void GivenMusicCategory() { _settings.MusicCategory = _category; } @@ -268,7 +268,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests public void Download_with_category_should_force_directory() { GivenSerialNumber(); - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); var remoteEpisode = CreateRemoteAlbum(); diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs index 166679f39..e20277368 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs @@ -84,7 +84,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests [Test] public void Download_with_category_should_force_directory() { - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); var remoteEpisode = CreateRemoteAlbum(); @@ -100,7 +100,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests [Test] public void Download_with_category_should_not_have_double_slashes() { - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); _transmissionConfigItems["download-dir"] += "/"; @@ -207,7 +207,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests [Test] public void should_exclude_items_not_in_category() { - GivenTvCategory(); + GivenMusicCategory(); _downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr"; diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs index 1a5179301..78274e57d 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Moq; using NUnit.Framework; @@ -110,7 +110,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests } - protected void GivenTvCategory() + protected void GivenMusicCategory() { _settings.MusicCategory = "Lidarr"; } @@ -194,4 +194,4 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests }); } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/VuzeTests/VuzeFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/VuzeTests/VuzeFixture.cs index b772f61ef..fe645fc26 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/VuzeTests/VuzeFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/VuzeTests/VuzeFixture.cs @@ -93,7 +93,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests [Test] public void Download_with_category_should_force_directory() { - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); var remoteEpisode = CreateRemoteAlbum(); @@ -109,7 +109,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests [Test] public void Download_with_category_should_not_have_double_slashes() { - GivenTvCategory(); + GivenMusicCategory(); GivenSuccessfulDownload(); _transmissionConfigItems["download-dir"] += "/"; @@ -216,7 +216,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests [Test] public void should_exclude_items_not_in_category() { - GivenTvCategory(); + GivenMusicCategory(); _downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr"; diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 9cdfd49bb..cba617f79 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -257,7 +257,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge if (!enabledPlugins.Contains("Label")) { - return new NzbDroneValidationFailure("TvCategory", "Label plugin not activated") + return new NzbDroneValidationFailure("MusicCategory", "Label plugin not activated") { DetailedDescription = "You must have the Label plugin enabled in Deluge to use categories." }; @@ -272,7 +272,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge if (!labels.Contains(Settings.MusicCategory)) { - return new NzbDroneValidationFailure("TvCategory", "Configuration of label failed") + return new NzbDroneValidationFailure("MusicCategory", "Configuration of label failed") { DetailedDescription = "Lidarr as unable to add the label to Deluge." }; diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs index 8431f8ec0..a80e1cbed 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs @@ -210,7 +210,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex { if (Settings.MusicCategory.IsNotNullOrWhiteSpace()) { - return new NzbDroneValidationFailure("TvCategory", "Group does not exist") + return new NzbDroneValidationFailure("MusicCategory", "Group does not exist") { DetailedDescription = "The Group you entered doesn't exist in NzbVortex. Go to NzbVortex to create it." }; diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs index 576205de1..81ef232b0 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs @@ -284,7 +284,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget if (!Settings.MusicCategory.IsNullOrWhiteSpace() && !categories.Any(v => v.Name == Settings.MusicCategory)) { - return new NzbDroneValidationFailure("TvCategory", "Category does not exist") + return new NzbDroneValidationFailure("MusicCategory", "Category does not exist") { InfoLink = string.Format("http://{0}:{1}/", Settings.Host, Settings.Port), DetailedDescription = "The Category your entered doesn't exist in NzbGet. Go to NzbGet to create it." diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index 0a2617512..4a1febde9 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -217,7 +217,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent else if (Settings.MusicCategory.IsNullOrWhiteSpace()) { // warn if labels are supported, but category is not provided - return new NzbDroneValidationFailure("TvCategory", "Category is recommended") + return new NzbDroneValidationFailure("MusicCategory", "Category is recommended") { IsWarning = true, DetailedDescription = "Lidarr will not attempt to import completed downloads without a category." diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index e074f7f55..1d0539165 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -435,7 +435,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd { if (category.Dir.EndsWith("*")) { - return new NzbDroneValidationFailure("TvCategory", "Enable Job folders") + return new NzbDroneValidationFailure("MusicCategory", "Enable Job folders") { InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/categories/", Settings.Host, Settings.Port), DetailedDescription = "Lidarr prefers each download to have a separate folder. With * appended to the Folder/Path Sabnzbd will not create these job folders. Go to Sabnzbd to fix it." @@ -446,7 +446,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd { if (!Settings.MusicCategory.IsNullOrWhiteSpace()) { - return new NzbDroneValidationFailure("TvCategory", "Category does not exist") + return new NzbDroneValidationFailure("MusicCategory", "Category does not exist") { InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/categories/", Settings.Host, Settings.Port), DetailedDescription = "The Category your entered doesn't exist in Sabnzbd. Go to Sabnzbd to create it." @@ -455,7 +455,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } if (config.Misc.enable_tv_sorting && ContainsCategory(config.Misc.tv_categories, Settings.MusicCategory)) { - return new NzbDroneValidationFailure("TvCategory", "Disable TV Sorting") + return new NzbDroneValidationFailure("MusicCategory", "Disable TV Sorting") { InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port), DetailedDescription = "You must disable Sabnzbd TV Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it." @@ -463,7 +463,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } if (config.Misc.enable_movie_sorting && ContainsCategory(config.Misc.movie_categories, Settings.MusicCategory)) { - return new NzbDroneValidationFailure("TvCategory", "Disable Movie Sorting") + return new NzbDroneValidationFailure("MusicCategory", "Disable Movie Sorting") { InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port), DetailedDescription = "You must disable Sabnzbd Movie Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it." @@ -471,7 +471,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } if (config.Misc.enable_date_sorting && ContainsCategory(config.Misc.date_categories, Settings.MusicCategory)) { - return new NzbDroneValidationFailure("TvCategory", "Disable Date Sorting") + return new NzbDroneValidationFailure("MusicCategory", "Disable Date Sorting") { InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port), DetailedDescription = "You must disable Sabnzbd Date Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it."