From b086414d75381671a030c4f7ad1ceea2fe060d1b Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 7 Jul 2011 20:57:44 -0700 Subject: [PATCH] some cleanup --- .../MediaFileProvider_GetNewFilenameTest.cs | 26 +++++++++---------- .../Providers/Core/ConfigProvider.cs | 6 ++--- .../Providers/Jobs/ImportNewSeriesJob.cs | 2 +- NzbDrone.Core/Providers/MediaFileProvider.cs | 2 +- .../Controllers/SettingsController.cs | 4 +-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NzbDrone.Core.Test/MediaFileProvider_GetNewFilenameTest.cs b/NzbDrone.Core.Test/MediaFileProvider_GetNewFilenameTest.cs index 009d9f9db..037e32ea5 100644 --- a/NzbDrone.Core.Test/MediaFileProvider_GetNewFilenameTest.cs +++ b/NzbDrone.Core.Test/MediaFileProvider_GetNewFilenameTest.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2); @@ -50,7 +50,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0); @@ -77,7 +77,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(1); @@ -104,7 +104,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3); @@ -132,7 +132,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3); @@ -159,7 +159,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3); @@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2); @@ -214,7 +214,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2); @@ -248,7 +248,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0); @@ -282,7 +282,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0); @@ -316,7 +316,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(true); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3); @@ -350,7 +350,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2); @@ -384,7 +384,7 @@ namespace NzbDrone.Core.Test var fakeConfig = mocker.GetMock(); fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false); - fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false); + fakeConfig.SetupGet(c => c.SortingIncludeEpisodeTitle).Returns(false); fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false); fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0); fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0); diff --git a/NzbDrone.Core/Providers/Core/ConfigProvider.cs b/NzbDrone.Core/Providers/Core/ConfigProvider.cs index 59902b6b6..ce9dd8095 100644 --- a/NzbDrone.Core/Providers/Core/ConfigProvider.cs +++ b/NzbDrone.Core/Providers/Core/ConfigProvider.cs @@ -197,13 +197,13 @@ namespace NzbDrone.Core.Providers.Core set { SetValue("BlackholeDirectory", value); } } - public virtual bool SortingSeriesName + public virtual bool SortingIncludeSeriesName { get { return GetValueBoolean("Sorting_SeriesName", true); } set { SetValue("Sorting_SeriesName", value); } } - public virtual bool SortingEpisodeName + public virtual bool SortingIncludeEpisodeTitle { get { return GetValueBoolean("Sorting_EpisodeName", true); } set { SetValue("Sorting_EpisodeName", value); } @@ -211,7 +211,7 @@ namespace NzbDrone.Core.Providers.Core public virtual bool SortingReplaceSpaces { - get { return GetValueBoolean("Sorting_ReplaceSpaces", true); } + get { return GetValueBoolean("Sorting_ReplaceSpaces"); } set { SetValue("Sorting_ReplaceSpaces", value); } } diff --git a/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs b/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs index 7c4876a46..6da507c41 100644 --- a/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs +++ b/NzbDrone.Core/Providers/Jobs/ImportNewSeriesJob.cs @@ -73,7 +73,7 @@ namespace NzbDrone.Core.Providers.Jobs var updatedSeries = _seriesProvider.GetSeries(currentSeries.SeriesId); AutoIgnoreSeasons(updatedSeries.SeriesId); - notification.CurrentMessage = String.Format("'{0}' was successfully imported", currentSeries.Title); + notification.CurrentMessage = String.Format("{0} was successfully imported", updatedSeries.Title); } catch (Exception e) diff --git a/NzbDrone.Core/Providers/MediaFileProvider.cs b/NzbDrone.Core/Providers/MediaFileProvider.cs index 0a592c04f..6d464b29b 100644 --- a/NzbDrone.Core/Providers/MediaFileProvider.cs +++ b/NzbDrone.Core/Providers/MediaFileProvider.cs @@ -175,7 +175,7 @@ namespace NzbDrone.Core.Providers .Replace("%x", numberStyle.EpisodeSeparator) .Replace("%p", separatorStyle.Pattern); - if (_configProvider.SortingEpisodeName) + if (_configProvider.SortingIncludeEpisodeTitle) { episodeNames = episodeNames.TrimEnd(' ', '+'); result += separatorStyle.Pattern + episodeNames; diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 72a0b2713..dd2c71a1a 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -164,7 +164,7 @@ namespace NzbDrone.Web.Controllers var model = new EpisodeSortingModel(); model.SeriesName = _configProvider.SortingIncludeSeriesName; - model.EpisodeName = _configProvider.SortingEpisodeName; + model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle; model.ReplaceSpaces = _configProvider.SortingReplaceSpaces; model.AppendQuality = _configProvider.SortingAppendQuality; model.SeasonFolders = _configProvider.UseSeasonFolder; @@ -436,7 +436,7 @@ namespace NzbDrone.Web.Controllers if (ModelState.IsValid) { _configProvider.SortingIncludeSeriesName = data.SeriesName; - _configProvider.SortingEpisodeName = data.EpisodeName; + _configProvider.SortingIncludeEpisodeTitle = data.EpisodeName; _configProvider.SortingReplaceSpaces = data.ReplaceSpaces; _configProvider.SortingAppendQuality = data.AppendQuality; _configProvider.UseSeasonFolder = data.SeasonFolders;