|
|
|
@ -9,13 +9,14 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class AggregateSubtitleInfoFixture : CoreTest<AggregateSubtitleInfo>
|
|
|
|
|
{
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].default.eng.forced.ass")]
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].eng.default.ass")]
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].fra.ass")]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].default.eng.forced.ass")]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].eng.default.ass")]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].fra.ass")]
|
|
|
|
|
public void should_do_basic_parse(string relativePath, string originalFilePath, string path)
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].default.eng.forced.ass", null)]
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].eng.default.ass", null)]
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "", "Name (2020) - S01E20 - [AAC 2.0].fra.ass", null)]
|
|
|
|
|
[TestCase("Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 5.1].mkv", "", "Name (2020) - S01E20 - [FLAC 2.0].fra.ass", "Name (2020)/Season 1/Name (2020) - S01E20 - [FLAC 2.0].mkv")]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].default.eng.forced.ass", null)]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].eng.default.ass", null)]
|
|
|
|
|
[TestCase("", "Name (2020)/Season 1/Name (2020) - S01E20 - [AAC 2.0].mkv", "Name (2020) - S01E20 - [AAC 2.0].fra.ass", null)]
|
|
|
|
|
public void should_do_basic_parse(string relativePath, string originalFilePath, string path, string fileNameBeforeRename)
|
|
|
|
|
{
|
|
|
|
|
var episodeFile = new EpisodeFile
|
|
|
|
|
{
|
|
|
|
@ -23,7 +24,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
|
|
|
|
|
OriginalFilePath = originalFilePath
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var subtitleTitleInfo = Subject.CleanSubtitleTitleInfo(episodeFile, path);
|
|
|
|
|
var subtitleTitleInfo = Subject.CleanSubtitleTitleInfo(episodeFile, path, fileNameBeforeRename);
|
|
|
|
|
|
|
|
|
|
subtitleTitleInfo.Title.Should().BeNull();
|
|
|
|
|
subtitleTitleInfo.Copy.Should().Be(0);
|
|
|
|
@ -40,7 +41,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators
|
|
|
|
|
RelativePath = relativePath
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var subtitleTitleInfo = Subject.CleanSubtitleTitleInfo(episodeFile, path);
|
|
|
|
|
var subtitleTitleInfo = Subject.CleanSubtitleTitleInfo(episodeFile, path, null);
|
|
|
|
|
|
|
|
|
|
subtitleTitleInfo.LanguageTags.Should().NotContain("default");
|
|
|
|
|
}
|
|
|
|
|