Renamed sorting config keys
This commit is contained in:
parent
15aedfc847
commit
452b5c8f84
|
@ -125,7 +125,7 @@
|
||||||
<virtualDirectory path="/" physicalPath="%NZBDRONE_PATH%\NZBDrone.Web" />
|
<virtualDirectory path="/" physicalPath="%NZBDRONE_PATH%\NZBDrone.Web" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:8989:" />
|
<binding protocol="http" bindingInformation="*:8980:" />
|
||||||
</bindings>
|
</bindings>
|
||||||
</site>
|
</site>
|
||||||
<applicationDefaults applicationPool="IISExpressAppPool" />
|
<applicationDefaults applicationPool="IISExpressAppPool" />
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Test
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
mocker.GetMock<ConfigProvider>().Setup(e => e.SeasonFolderFormat).Returns(seasonFolderFormat);
|
mocker.GetMock<ConfigProvider>().Setup(e => e.SortingSeasonFolderFormat).Returns(seasonFolderFormat);
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
var result = mocker.Resolve<MediaFileProvider>().CalculateFilePath(fakeSeries, 1, filename, ".mkv");
|
var result = mocker.Resolve<MediaFileProvider>().CalculateFilePath(fakeSeries, 1, filename, ".mkv");
|
||||||
|
|
|
@ -22,12 +22,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "City Sushi")
|
.With(e => e.Title = "City Sushi")
|
||||||
|
@ -49,12 +49,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "City Sushi")
|
.With(e => e.Title = "City Sushi")
|
||||||
|
@ -76,12 +76,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "City Sushi")
|
.With(e => e.Title = "City Sushi")
|
||||||
|
@ -103,12 +103,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(3);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
|
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
|
@ -131,12 +131,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(3);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(true);
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "City Sushi")
|
.With(e => e.Title = "City Sushi")
|
||||||
|
@ -158,12 +158,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(3);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(true);
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "City Sushi")
|
.With(e => e.Title = "City Sushi")
|
||||||
|
@ -185,12 +185,12 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
|
|
||||||
|
|
||||||
var episode = Builder<Episode>.CreateNew()
|
var episode = Builder<Episode>.CreateNew()
|
||||||
|
@ -213,13 +213,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(3);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(3);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
@ -247,13 +247,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(2);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
@ -281,13 +281,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(2);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
@ -315,13 +315,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(1);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(3);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(3);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(1);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(1);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
@ -349,13 +349,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(2);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(0);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
@ -383,13 +383,13 @@ namespace NzbDrone.Core.Test
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
|
|
||||||
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
var fakeConfig = mocker.GetMock<ConfigProvider>();
|
||||||
fakeConfig.SetupGet(c => c.SeriesName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingIncludeSeriesName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.EpisodeName).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingEpisodeName).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.AppendQuality).Returns(false);
|
fakeConfig.SetupGet(c => c.SortingAppendQuality).Returns(false);
|
||||||
fakeConfig.SetupGet(c => c.SeparatorStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingSeparatorStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.NumberStyle).Returns(0);
|
fakeConfig.SetupGet(c => c.SortingNumberStyle).Returns(0);
|
||||||
fakeConfig.SetupGet(c => c.ReplaceSpaces).Returns(true);
|
fakeConfig.SetupGet(c => c.SortingReplaceSpaces).Returns(true);
|
||||||
fakeConfig.SetupGet(c => c.MultiEpisodeStyle).Returns(2);
|
fakeConfig.SetupGet(c => c.SortingMultiEpisodeStyle).Returns(2);
|
||||||
|
|
||||||
var episodeOne = Builder<Episode>.CreateNew()
|
var episodeOne = Builder<Episode>.CreateNew()
|
||||||
.With(e => e.Title = "Strawberries and Cream (1)")
|
.With(e => e.Title = "Strawberries and Cream (1)")
|
||||||
|
|
|
@ -197,25 +197,25 @@ namespace NzbDrone.Core.Providers.Core
|
||||||
set { SetValue("BlackholeDirectory", value); }
|
set { SetValue("BlackholeDirectory", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool SeriesName
|
public virtual bool SortingSeriesName
|
||||||
{
|
{
|
||||||
get { return GetValueBoolean("Sorting_SeriesName", true); }
|
get { return GetValueBoolean("Sorting_SeriesName", true); }
|
||||||
set { SetValue("Sorting_SeriesName", value); }
|
set { SetValue("Sorting_SeriesName", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool EpisodeName
|
public virtual bool SortingEpisodeName
|
||||||
{
|
{
|
||||||
get { return GetValueBoolean("Sorting_EpisodeName", true); }
|
get { return GetValueBoolean("Sorting_EpisodeName", true); }
|
||||||
set { SetValue("Sorting_EpisodeName", value); }
|
set { SetValue("Sorting_EpisodeName", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool ReplaceSpaces
|
public virtual bool SortingReplaceSpaces
|
||||||
{
|
{
|
||||||
get { return GetValueBoolean("Sorting_ReplaceSpaces", true); }
|
get { return GetValueBoolean("Sorting_ReplaceSpaces", true); }
|
||||||
set { SetValue("Sorting_ReplaceSpaces", value); }
|
set { SetValue("Sorting_ReplaceSpaces", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool AppendQuality
|
public virtual bool SortingAppendQuality
|
||||||
{
|
{
|
||||||
get { return GetValueBoolean("Sorting_AppendQaulity", true); }
|
get { return GetValueBoolean("Sorting_AppendQaulity", true); }
|
||||||
set { SetValue("Sorting_AppendQaulity", value); }
|
set { SetValue("Sorting_AppendQaulity", value); }
|
||||||
|
@ -223,30 +223,30 @@ namespace NzbDrone.Core.Providers.Core
|
||||||
|
|
||||||
public virtual bool UseSeasonFolder
|
public virtual bool UseSeasonFolder
|
||||||
{
|
{
|
||||||
get { return GetValueBoolean("Sorting_SeasonFolder", true); }
|
get { return GetValueBoolean("UseSeasonFolder", true); }
|
||||||
|
|
||||||
set { SetValue("Sorting_SeasonFolder", value); }
|
set { SetValue("UseSeasonFolder", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual string SeasonFolderFormat
|
public virtual string SortingSeasonFolderFormat
|
||||||
{
|
{
|
||||||
get { return GetValue("Sorting_SeasonFolderFormat", "Season %s"); }
|
get { return GetValue("Sorting_SeasonFolderFormat", "Season %s"); }
|
||||||
set { SetValue("Sorting_SeasonFolderFormat", value); }
|
set { SetValue("Sorting_SeasonFolderFormat", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int SeparatorStyle
|
public virtual int SortingSeparatorStyle
|
||||||
{
|
{
|
||||||
get { return GetValueInt("Sorting_SeparatorStyle"); }
|
get { return GetValueInt("Sorting_SeparatorStyle"); }
|
||||||
set { SetValue("Sorting_SeparatorStyle", value); }
|
set { SetValue("Sorting_SeparatorStyle", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int NumberStyle
|
public virtual int SortingNumberStyle
|
||||||
{
|
{
|
||||||
get { return GetValueInt("Sorting_NumberStyle", 2); }
|
get { return GetValueInt("Sorting_NumberStyle", 2); }
|
||||||
set { SetValue("Sorting_NumberStyle", value); }
|
set { SetValue("Sorting_NumberStyle", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int MultiEpisodeStyle
|
public virtual int SortingMultiEpisodeStyle
|
||||||
{
|
{
|
||||||
get { return GetValueInt("Sorting_MultiEpisodeStyle"); }
|
get { return GetValueInt("Sorting_MultiEpisodeStyle"); }
|
||||||
set { SetValue("Sorting_MultiEpisodeStyle", value); }
|
set { SetValue("Sorting_MultiEpisodeStyle", value); }
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace NzbDrone.Core.Providers
|
||||||
string path = series.Path;
|
string path = series.Path;
|
||||||
if (series.SeasonFolder)
|
if (series.SeasonFolder)
|
||||||
{
|
{
|
||||||
var seasonFolder = _configProvider.SeasonFolderFormat
|
var seasonFolder = _configProvider.SortingSeasonFolderFormat
|
||||||
.Replace("%0s", seasonNumber.ToString("00"))
|
.Replace("%0s", seasonNumber.ToString("00"))
|
||||||
.Replace("%s", seasonNumber.ToString());
|
.Replace("%s", seasonNumber.ToString());
|
||||||
|
|
||||||
|
@ -132,16 +132,17 @@ namespace NzbDrone.Core.Providers
|
||||||
return updated;
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual string GetNewFilename(IList<Episode> episodes, string seriesTitle, QualityTypes quality)
|
public virtual string GetNewFilename(IList<Episode> episodes, string seriesTitle, QualityTypes quality)
|
||||||
{
|
{
|
||||||
var separatorStyle = EpisodeSortingHelper.GetSeparatorStyle(_configProvider.SeparatorStyle);
|
var separatorStyle = EpisodeSortingHelper.GetSeparatorStyle(_configProvider.SortingSeparatorStyle);
|
||||||
var numberStyle = EpisodeSortingHelper.GetNumberStyle(_configProvider.NumberStyle);
|
var numberStyle = EpisodeSortingHelper.GetNumberStyle(_configProvider.SortingNumberStyle);
|
||||||
|
|
||||||
string episodeNames = episodes[0].Title;
|
string episodeNames = episodes[0].Title;
|
||||||
|
|
||||||
string result = String.Empty;
|
string result = String.Empty;
|
||||||
|
|
||||||
if (_configProvider.SeriesName)
|
if (_configProvider.SortingIncludeSeriesName)
|
||||||
{
|
{
|
||||||
result += seriesTitle + separatorStyle.Pattern;
|
result += seriesTitle + separatorStyle.Pattern;
|
||||||
}
|
}
|
||||||
|
@ -150,7 +151,7 @@ namespace NzbDrone.Core.Providers
|
||||||
|
|
||||||
if (episodes.Count > 1)
|
if (episodes.Count > 1)
|
||||||
{
|
{
|
||||||
var multiEpisodeStyle = EpisodeSortingHelper.GetMultiEpisodeStyle(_configProvider.MultiEpisodeStyle);
|
var multiEpisodeStyle = EpisodeSortingHelper.GetMultiEpisodeStyle(_configProvider.SortingMultiEpisodeStyle);
|
||||||
|
|
||||||
foreach (var episode in episodes.OrderBy(e => e.EpisodeNumber).Skip(1))
|
foreach (var episode in episodes.OrderBy(e => e.EpisodeNumber).Skip(1))
|
||||||
{
|
{
|
||||||
|
@ -174,16 +175,16 @@ namespace NzbDrone.Core.Providers
|
||||||
.Replace("%x", numberStyle.EpisodeSeparator)
|
.Replace("%x", numberStyle.EpisodeSeparator)
|
||||||
.Replace("%p", separatorStyle.Pattern);
|
.Replace("%p", separatorStyle.Pattern);
|
||||||
|
|
||||||
if (_configProvider.EpisodeName)
|
if (_configProvider.SortingEpisodeName)
|
||||||
{
|
{
|
||||||
episodeNames = episodeNames.TrimEnd(' ', '+');
|
episodeNames = episodeNames.TrimEnd(' ', '+');
|
||||||
result += separatorStyle.Pattern + episodeNames;
|
result += separatorStyle.Pattern + episodeNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_configProvider.AppendQuality)
|
if (_configProvider.SortingAppendQuality)
|
||||||
result += String.Format(" [{0}]", quality);
|
result += String.Format(" [{0}]", quality);
|
||||||
|
|
||||||
if (_configProvider.ReplaceSpaces)
|
if (_configProvider.SortingReplaceSpaces)
|
||||||
result = result.Replace(' ', '.');
|
result = result.Replace(' ', '.');
|
||||||
|
|
||||||
Logger.Trace("New File Name is: [{0}]", result.Trim());
|
Logger.Trace("New File Name is: [{0}]", result.Trim());
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Providers
|
||||||
repoSeries.Monitored = true; //New shows should be monitored
|
repoSeries.Monitored = true; //New shows should be monitored
|
||||||
repoSeries.QualityProfileId = qualityProfileId;
|
repoSeries.QualityProfileId = qualityProfileId;
|
||||||
if (qualityProfileId == 0)
|
if (qualityProfileId == 0)
|
||||||
repoSeries.QualityProfileId = Convert.ToInt32(_configProvider.GetValue("DefaultQualityProfile", "1"));
|
repoSeries.QualityProfileId = _configProvider.DefaultQualityProfile;
|
||||||
|
|
||||||
repoSeries.SeasonFolder = _configProvider.UseSeasonFolder;
|
repoSeries.SeasonFolder = _configProvider.UseSeasonFolder;
|
||||||
|
|
||||||
|
|
|
@ -163,15 +163,15 @@ namespace NzbDrone.Web.Controllers
|
||||||
{
|
{
|
||||||
var model = new EpisodeSortingModel();
|
var model = new EpisodeSortingModel();
|
||||||
|
|
||||||
model.SeriesName = _configProvider.SeriesName;
|
model.SeriesName = _configProvider.SortingIncludeSeriesName;
|
||||||
model.EpisodeName = _configProvider.EpisodeName;
|
model.EpisodeName = _configProvider.SortingEpisodeName;
|
||||||
model.ReplaceSpaces = _configProvider.ReplaceSpaces;
|
model.ReplaceSpaces = _configProvider.SortingReplaceSpaces;
|
||||||
model.AppendQuality = _configProvider.AppendQuality;
|
model.AppendQuality = _configProvider.SortingAppendQuality;
|
||||||
model.SeasonFolders = _configProvider.UseSeasonFolder;
|
model.SeasonFolders = _configProvider.UseSeasonFolder;
|
||||||
model.SeasonFolderFormat = _configProvider.SeasonFolderFormat;
|
model.SeasonFolderFormat = _configProvider.SortingSeasonFolderFormat;
|
||||||
model.SeparatorStyle = _configProvider.SeparatorStyle;
|
model.SeparatorStyle = _configProvider.SortingSeparatorStyle;
|
||||||
model.NumberStyle = _configProvider.NumberStyle;
|
model.NumberStyle = _configProvider.SortingNumberStyle;
|
||||||
model.MultiEpisodeStyle = _configProvider.MultiEpisodeStyle;
|
model.MultiEpisodeStyle = _configProvider.SortingMultiEpisodeStyle;
|
||||||
|
|
||||||
model.SeparatorStyles = new SelectList(EpisodeSortingHelper.GetSeparatorStyles(), "Id", "Name");
|
model.SeparatorStyles = new SelectList(EpisodeSortingHelper.GetSeparatorStyles(), "Id", "Name");
|
||||||
model.NumberStyles = new SelectList(EpisodeSortingHelper.GetNumberStyles(), "Id", "Name");
|
model.NumberStyles = new SelectList(EpisodeSortingHelper.GetNumberStyles(), "Id", "Name");
|
||||||
|
@ -435,15 +435,15 @@ namespace NzbDrone.Web.Controllers
|
||||||
|
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
_configProvider.SeriesName = data.SeriesName;
|
_configProvider.SortingIncludeSeriesName = data.SeriesName;
|
||||||
_configProvider.EpisodeName = data.EpisodeName;
|
_configProvider.SortingEpisodeName = data.EpisodeName;
|
||||||
_configProvider.ReplaceSpaces = data.ReplaceSpaces;
|
_configProvider.SortingReplaceSpaces = data.ReplaceSpaces;
|
||||||
_configProvider.AppendQuality = data.AppendQuality;
|
_configProvider.SortingAppendQuality = data.AppendQuality;
|
||||||
_configProvider.UseSeasonFolder = data.SeasonFolders;
|
_configProvider.UseSeasonFolder = data.SeasonFolders;
|
||||||
_configProvider.SeasonFolderFormat = data.SeasonFolderFormat;
|
_configProvider.SortingSeasonFolderFormat = data.SeasonFolderFormat;
|
||||||
_configProvider.SeparatorStyle = data.SeparatorStyle;
|
_configProvider.SortingSeparatorStyle = data.SeparatorStyle;
|
||||||
_configProvider.NumberStyle = data.NumberStyle;
|
_configProvider.SortingNumberStyle = data.NumberStyle;
|
||||||
_configProvider.MultiEpisodeStyle = data.MultiEpisodeStyle;
|
_configProvider.SortingMultiEpisodeStyle = data.MultiEpisodeStyle;
|
||||||
|
|
||||||
basicNotification.Title = SETTINGS_SAVED;
|
basicNotification.Title = SETTINGS_SAVED;
|
||||||
_notificationProvider.Register(basicNotification);
|
_notificationProvider.Register(basicNotification);
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
<supportedRuntime version="v4.0" />
|
<supportedRuntime version="v4.0" />
|
||||||
</startup>
|
</startup>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="port" value="8989" />
|
<add key="port" value="8980" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
Loading…
Reference in New Issue