1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Fixed: Latvian and Russian language parsing

Added proper support for Latvian with test cases I have encountered in the wild and fixed a case where Russian is not recognized (RU instead of RUS).
This commit is contained in:
Andrejs Ķīlis
2024-01-08 21:49:17 +02:00
committed by Mark McDowall
parent fd58e9671c
commit 21666df8f1
2 changed files with 22 additions and 1 deletions
@@ -152,8 +152,19 @@ namespace NzbDrone.Core.Test.ParserTests
result.Should().Contain(Language.Korean);
}
[TestCase("Title.the.Series.2009.S01E08.2160p.WEB-DL.LAV.ENG")]
[TestCase("Title.the.Series.S01.COMPLETE.2009.1080p.WEB-DL.x264.AVC.AAC.LT.LV.RU")]
[TestCase("Title.the.Series.S03.1080p.WEB.x264.LAT.ENG")]
[TestCase("Title.the.Series.S02E02.LATViAN.1080p.WEB.XviD-LOL")]
public void should_parse_language_latvian(string postTitle)
{
var result = LanguageParser.ParseLanguages(postTitle);
result.Should().Contain(Language.Latvian);
}
[TestCase("Title.the.Series.2009.S01E14.Russian.HDTV.XviD-LOL")]
[TestCase("Title.the.Series.S01E01.1080p.WEB-DL.Rus.Eng.TVKlondike")]
[TestCase("Title.the.Series.S01.COMPLETE.2009.1080p.WEB-DL.x264.AVC.AAC.LT.LV.RU")]
public void should_parse_language_russian(string postTitle)
{
var result = LanguageParser.ParseLanguages(postTitle);