|
|
|
@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series_Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South_Park");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -96,7 +96,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series-Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South-Park");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -105,7 +105,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{SERIES TITLE}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("SOUTH PARK");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{sErIES-tItLE}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be(_series.Title.Replace(' ', '-'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -123,16 +123,26 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{series title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("south park");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_cleanup_Series_Title()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.CleanTitle}";
|
|
|
|
|
_series.Title = "South Park (1997)";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.1997");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_replace_episode_title()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Episode Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -141,7 +151,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{ePisOde-TitLe}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("City-Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -151,7 +161,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.SeasonNumber = 1;
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{season}x{episode}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("1x6");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -161,7 +171,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.SeasonNumber = 1;
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{season:00}x{episode}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("01x6");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -171,7 +181,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.SeasonNumber = 1;
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{season}x{episode}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("1x6");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -181,7 +191,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.SeasonNumber = 1;
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{season}x{episode:00}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("1x06");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -190,7 +200,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Quality Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("HDTV-720p");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -200,7 +210,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Quality Title}";
|
|
|
|
|
_episodeFile.Quality.Proper = true;
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("HDTV-720p Proper");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -209,7 +219,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title} [{Quality Title}]";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06 - City Sushi [HDTV-720p]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -219,7 +229,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.RenameEpisodes = false;
|
|
|
|
|
_episodeFile.Path = @"C:\Test\TV\30 Rock - S01E01 - Test";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be(Path.GetFileNameWithoutExtension(_episodeFile.Path));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -230,7 +240,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episodeFile.SceneName = "30.Rock.S01E01.xvid-LOL";
|
|
|
|
|
_episodeFile.Path = @"C:\Test\TV\30 Rock - S01E01 - Test";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("30.Rock.S01E01.xvid-LOL");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -253,7 +263,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {episode2, episode}, new Series {Title = "30 Rock"}, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {episode2, episode}, new Series {Title = "30 Rock"}, _episodeFile)
|
|
|
|
|
.Should().Be("30 Rock - S06E06-E07 - Hey, Baby, What's Wrong!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -266,7 +276,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.Title = "Hello";
|
|
|
|
|
_episode2.Title = "World";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1, _episode2}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1, _episode2}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06-E07 - Hello + World");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -281,7 +291,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.AirDate = "2012-12-13";
|
|
|
|
|
_episode1.Title = "Kristen Stewart";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("The Daily Show with Jon Stewart - 2012-12-13 - Kristen Stewart");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -296,7 +306,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episode1.AirDate = null;
|
|
|
|
|
_episode1.Title = "Kristen Stewart";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("The Daily Show with Jon Stewart - Unknown - Kristen Stewart");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -306,7 +316,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title}";
|
|
|
|
|
_namingConfig.MultiEpisodeStyle = 0;
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> {_episode1, _episode2}, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> {_episode1, _episode2}, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06-07 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -316,7 +326,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title}";
|
|
|
|
|
_namingConfig.MultiEpisodeStyle = 1;
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06 - S15E07 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -326,7 +336,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title}";
|
|
|
|
|
_namingConfig.MultiEpisodeStyle = 2;
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06E07 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -336,7 +346,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - S{season:00}E{episode:00} - {Episode Title}";
|
|
|
|
|
_namingConfig.MultiEpisodeStyle = 3;
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - S15E06-E07 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -348,7 +358,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Episode Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be(title);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -357,7 +367,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Release Group}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be(_episodeFile.ReleaseGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -370,7 +380,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_episodeFile.SceneName = "30.Rock.S01E01.xvid-LOL";
|
|
|
|
|
_episodeFile.Path = @"C:\Test\TV\30 Rock - S01E01 - Test";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("30 Rock - 30.Rock.S01E01.xvid-LOL");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -387,7 +397,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { episode }, new Series { Title = "30 Rock" }, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { episode }, new Series { Title = "30 Rock" }, _episodeFile)
|
|
|
|
|
.Should().Be("30 Rock - S06E06 - Part 1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -404,7 +414,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { episode }, new Series { Title = "30 Rock" }, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { episode }, new Series { Title = "30 Rock" }, _episodeFile)
|
|
|
|
|
.Should().Be("30 Rock - S06E06 - Part 1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -419,7 +429,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
.With(e => e.EpisodeNumber = 6)
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { episode }, new Series { Title = "Chicago P.D." }, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { episode }, new Series { Title = "Chicago P.D." }, _episodeFile)
|
|
|
|
|
.Should().Be("Chicago.P.D.S06E06.Part.1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -434,7 +444,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
.With(e => e.EpisodeNumber = 6)
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { episode }, new Series { Title = "Chicago P.D.." }, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { episode }, new Series { Title = "Chicago P.D.." }, _episodeFile)
|
|
|
|
|
.Should().Be("Chicago.P.D.S06E06.Part.1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -443,7 +453,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}.{absolute:00}.{Episode.Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06.City.Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -453,7 +463,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_series.SeriesType = SeriesTypes.Anime;
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}.{absolute:00}.{Episode.Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06.100.City.Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -463,7 +473,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_series.SeriesType = SeriesTypes.Anime;
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}.{Episode.Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06.City.Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -473,7 +483,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_series.SeriesType = SeriesTypes.Anime;
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series.Title}.{absolute:00}.{Episode.Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.100.City.Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -483,7 +493,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_series.SeriesType = SeriesTypes.Anime;
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series Title} - {absolute:000} - {Episode Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - 100-101 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -496,7 +506,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series Title} - {season:0}x{episode:00} - {Episode Title}";
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series Title} - {absolute:000} - {Episode Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - 15x06 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -507,8 +517,62 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|
|
|
|
_namingConfig.MultiEpisodeStyle = (int)MultiEpisodeStyle.Duplicate;
|
|
|
|
|
_namingConfig.AnimeEpisodeFormat = "{Series Title} - {absolute:000} - {Episode Title}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFilename(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South Park - 100 - 101 - City Sushi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_include_affixes_if_value_not_empty()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}{_Episode.Title_}";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06_City.Sushi_");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_include_affixes_if_value_empty()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}{_Episode.Title_}";
|
|
|
|
|
|
|
|
|
|
_episode1.Title = "";
|
|
|
|
|
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_format_mediainfo_properly()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}.{Episode.Title}.{MEDIAINFO.FULL}";
|
|
|
|
|
|
|
|
|
|
_episodeFile.MediaInfo = new Core.MediaFiles.MediaInfo.MediaInfoModel()
|
|
|
|
|
{
|
|
|
|
|
VideoCodec = "AVC",
|
|
|
|
|
AudioFormat = "DTS",
|
|
|
|
|
AudioLanguages = "English/Spanish",
|
|
|
|
|
Subtitles = "English/Spanish/Italian"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06.City.Sushi.X264.DTS[EN+ES].[EN+ES+IT]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_exclude_english_in_mediainfo_audio_language()
|
|
|
|
|
{
|
|
|
|
|
_namingConfig.StandardEpisodeFormat = "{Series.Title}.S{season:00}E{episode:00}.{Episode.Title}.{MEDIAINFO.FULL}";
|
|
|
|
|
|
|
|
|
|
_episodeFile.MediaInfo = new Core.MediaFiles.MediaInfo.MediaInfoModel()
|
|
|
|
|
{
|
|
|
|
|
VideoCodec = "AVC",
|
|
|
|
|
AudioFormat = "DTS",
|
|
|
|
|
AudioLanguages = "English",
|
|
|
|
|
Subtitles = "English/Spanish/Italian"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
|
|
|
|
.Should().Be("South.Park.S15E06.City.Sushi.X264.DTS.[EN+ES+IT]");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|