1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Change Language on FileNameSampleService so AudioLanguages token works

Fixes #4185
This commit is contained in:
Qstick 2020-02-24 19:06:33 -05:00
parent c7dfd9dcf1
commit 3969a396d3
2 changed files with 7 additions and 21 deletions

View File

@ -35,7 +35,7 @@ public void Setup()
Mocker.GetMock<INamingConfigService>()
.Setup(c => c.GetConfig()).Returns(_namingConfig);
_movieFile = new MovieFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "SonarrTest" };
_movieFile = new MovieFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "RadarrTest" };
Mocker.GetMock<IQualityDefinitionService>()
.Setup(v => v.Get(Moq.It.IsAny<Quality>()))
@ -89,7 +89,7 @@ public void should_replace_Movie_dash_Title()
}
[Test]
public void should_replace_SERIES_TITLE_with_all_caps()
public void should_replace_MOVIE_TITLE_with_all_caps()
{
_namingConfig.StandardMovieFormat = "{MOVIE TITLE}";
@ -98,7 +98,7 @@ public void should_replace_SERIES_TITLE_with_all_caps()
}
[Test]
public void should_replace_SERIES_TITLE_with_random_casing_should_keep_original_casing()
public void should_replace_MOVIE_TITLE_with_random_casing_should_keep_original_casing()
{
_namingConfig.StandardMovieFormat = "{mOvIe-tItLE}";
@ -107,7 +107,7 @@ public void should_replace_SERIES_TITLE_with_random_casing_should_keep_original_
}
[Test]
public void should_replace_series_title_with_all_lower_case()
public void should_replace_movie_title_with_all_lower_case()
{
_namingConfig.StandardMovieFormat = "{movie title}";
@ -444,7 +444,7 @@ public void should_be_able_to_use_original_filename_only()
}
[Test]
public void should_use_Sonarr_as_release_group_when_not_available()
public void should_use_Radarr_as_release_group_when_not_available()
{
_movieFile.ReleaseGroup = null;
_namingConfig.StandardMovieFormat = "{Release Group}";
@ -456,7 +456,7 @@ public void should_use_Sonarr_as_release_group_when_not_available()
[TestCase("{Movie Title}{-Release Group}", "South Park")]
[TestCase("{Movie Title}{ Release Group}", "South Park")]
[TestCase("{Movie Title}{ [Release Group]}", "South Park")]
public void should_not_use_Sonarr_as_release_group_if_pattern_has_separator(string pattern, string expectedFileName)
public void should_not_use_Radarr_as_release_group_if_pattern_has_separator(string pattern, string expectedFileName)
{
_movieFile.ReleaseGroup = null;
_namingConfig.StandardMovieFormat = pattern;

View File

@ -32,24 +32,10 @@ public FileNameSampleService(IBuildFileNames buildFileNames)
AudioFormat = "DTS",
AudioChannels = 6,
AudioChannelPositions = "3/2/0.1",
AudioLanguages = "English",
AudioLanguages = "German",
Subtitles = "English/German"
};
var mediaInfoAnime = new MediaInfoModel()
{
VideoFormat = "AVC",
VideoBitDepth = 10,
VideoMultiViewCount = 2,
VideoColourPrimaries = "BT.2020",
VideoTransferCharacteristics = "HLG",
AudioFormat = "DTS",
AudioChannels = 6,
AudioChannelPositions = "3/2/0.1",
AudioLanguages = "Japanese",
Subtitles = "Japanese/English"
};
_movieFile = new MovieFile
{
Quality = new QualityModel(Quality.Bluray1080p, new Revision(2)),