mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Fixed: Don't parse language from series title for v2 releases
Closes #7182
This commit is contained in:
parent
f20ac9dc34
commit
55363f4e3d
@ -1,5 +1,6 @@
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
@ -100,5 +101,14 @@ public void should_parse_multiple_series_titles(string postTitle, params string[
|
||||
var seriesTitleInfo = Parser.Parser.ParseTitle(postTitle).SeriesTitleInfo;
|
||||
seriesTitleInfo.AllTitles.Should().BeEquivalentTo(titles);
|
||||
}
|
||||
|
||||
[TestCase("[Reza] Series in Russian - S01E08 [WEBRip 1080p HEVC AAC] (Dual Audio) (Tokidoki Bosotto Russiago de Dereru Tonari no Alya-san)", "Unknown")]
|
||||
public void should_parse_language_after_parsing_title(string postTitle, string expectedLanguage)
|
||||
{
|
||||
var result = Parser.Parser.ParseTitle(postTitle);
|
||||
|
||||
result.Languages.Count.Should().Be(1);
|
||||
result.Languages.Should().Contain((Language)expectedLanguage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -767,7 +767,7 @@ public static ParsedEpisodeInfo ParseTitle(string title)
|
||||
result.Special = true;
|
||||
}
|
||||
|
||||
result.Languages = LanguageParser.ParseLanguages(releaseTitle);
|
||||
result.Languages = LanguageParser.ParseLanguages(result.ReleaseTokens);
|
||||
Logger.Debug("Languages parsed: {0}", string.Join(", ", result.Languages));
|
||||
|
||||
result.Quality = QualityParser.ParseQuality(title);
|
||||
|
Loading…
Reference in New Issue
Block a user