1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

New: Added Icelandic language and improved Chinese language detection

This commit is contained in:
Taloth Saldono
2019-02-09 20:40:36 +01:00
parent 813e5e1db8
commit 0214ced8f0
6 changed files with 36 additions and 114 deletions
@@ -88,18 +88,30 @@ namespace NzbDrone.Core.Test.ParserTests
result.Language.Id.Should().Be(Language.Japanese.Id);
}
[TestCase("Castle.2009.S01E14.Cantonese.HDTV.XviD-LOL")]
public void should_parse_language_cantonese(string postTitle)
[TestCase("Castle.2009.S01E14.Icelandic.HDTV.XviD-LOL")]
[TestCase("S.B.S01E03.1080p.WEB-DL.DD5.1.H.264-SbR Icelandic")]
public void should_parse_language_icelandic(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Cantonese.Id);
result.Language.Id.Should().Be(Language.Icelandic.Id);
}
[TestCase("Castle.2009.S01E14.Chinese.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.Cantonese.HDTV.XviD-LOL")]
[TestCase("Castle.2009.S01E14.Mandarin.HDTV.XviD-LOL")]
public void should_parse_language_mandarin(string postTitle)
[TestCase("[abc] My Series - 01 [CHS]")]
[TestCase("[abc] My Series - 01 [CHT]")]
[TestCase("[abc] My Series - 01 [BIG5]")]
[TestCase("[abc] My Series - 01 [GB]")]
[TestCase("[abc] My Series - 01 []")]
[TestCase("[abc] My Series - 01 []")]
[TestCase("[abc] My Series - 01 []")]
[TestCase("[abc] My Series - 01 []")]
[TestCase("[ZERO字幕组]My Series/My Series[01][HDTV]")]
public void should_parse_language_chinese(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);
result.Language.Id.Should().Be(Language.Mandarin.Id);
result.Language.Id.Should().Be(Language.Chinese.Id);
}
[TestCase("Castle.2009.S01E14.Korean.HDTV.XviD-LOL")]