diff --git a/src/NzbDrone.Core.Test/Languages/LanguageFixture.cs b/src/NzbDrone.Core.Test/Languages/LanguageFixture.cs index 11d381383..e160ac24d 100644 --- a/src/NzbDrone.Core.Test/Languages/LanguageFixture.cs +++ b/src/NzbDrone.Core.Test/Languages/LanguageFixture.cs @@ -61,7 +61,8 @@ namespace NzbDrone.Core.Test.Languages new object[] { 46, Language.Macedonian }, new object[] { 47, Language.Slovenian }, new object[] { 48, Language.Malayalam }, - new object[] { 49, Language.Kannada } + new object[] { 49, Language.Kannada }, + new object[] { 50, Language.Albanian } }; public static object[] ToIntCases = @@ -117,7 +118,8 @@ namespace NzbDrone.Core.Test.Languages new object[] { Language.Macedonian, 46 }, new object[] { Language.Slovenian, 47 }, new object[] { Language.Malayalam, 48 }, - new object[] { Language.Kannada, 49 } + new object[] { Language.Kannada, 49 }, + new object[] { Language.Albanian, 50 } }; [Test] diff --git a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs index e1f3dae23..79647690d 100644 --- a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs @@ -444,6 +444,14 @@ namespace NzbDrone.Core.Test.ParserTests result.Should().Contain(Language.Kannada); } + [TestCase("Movie Title (2024) Albanian 1080p HD AVC MP4 x264 .9.8GB TEAMTR")] + [TestCase("Movie.Title.2024.Albanian.1080p.AMZN.WEB-DL.DD+2.0.x264-Telly")] + public void should_parse_language_albanian(string postTitle) + { + var result = LanguageParser.ParseLanguages(postTitle); + result.Should().Contain(Language.Albanian); + } + [TestCase("Movie.Title.en.sub")] [TestCase("Movie Title.eng.sub")] [TestCase("Movie.Title.eng.forced.sub")] diff --git a/src/NzbDrone.Core/ImportLists/TMDb/TMDbLanguageCodes.cs b/src/NzbDrone.Core/ImportLists/TMDb/TMDbLanguageCodes.cs index 596d1cf57..0072d2db6 100644 --- a/src/NzbDrone.Core/ImportLists/TMDb/TMDbLanguageCodes.cs +++ b/src/NzbDrone.Core/ImportLists/TMDb/TMDbLanguageCodes.cs @@ -61,6 +61,8 @@ namespace NzbDrone.Core.ImportLists.TMDb [FieldOption(Hint = "Malayalam")] ml, [FieldOption(Hint = "Kannada")] - kn + kn, + [FieldOption(Hint = "Albanian")] + sq } } diff --git a/src/NzbDrone.Core/Languages/Language.cs b/src/NzbDrone.Core/Languages/Language.cs index 9aa5d034d..3dc0592b0 100644 --- a/src/NzbDrone.Core/Languages/Language.cs +++ b/src/NzbDrone.Core/Languages/Language.cs @@ -120,6 +120,7 @@ namespace NzbDrone.Core.Languages public static Language Slovenian => new Language(47, "Slovenian"); public static Language Malayalam => new Language(48, "Malayalam"); public static Language Kannada => new Language(49, "Kannada"); + public static Language Albanian => new Language(50, "Albanian"); public static Language Any => new Language(-1, "Any"); public static Language Original => new Language(-2, "Original"); @@ -179,6 +180,7 @@ namespace NzbDrone.Core.Languages Slovenian, Malayalam, Kannada, + Albanian, Any, Original }; diff --git a/src/NzbDrone.Core/Parser/IsoLanguages.cs b/src/NzbDrone.Core/Parser/IsoLanguages.cs index b16c3cb39..c9aa6b280 100644 --- a/src/NzbDrone.Core/Parser/IsoLanguages.cs +++ b/src/NzbDrone.Core/Parser/IsoLanguages.cs @@ -59,6 +59,7 @@ namespace NzbDrone.Core.Parser new IsoLanguage("sl", "", "slv", "Slovenian", Language.Slovenian), new IsoLanguage("ml", "", "mal", "Malayalam", Language.Malayalam), new IsoLanguage("kn", "", "kan", "Kannada", Language.Kannada), + new IsoLanguage("sq", "", "sqi", "Albanian", Language.Albanian), }; private static readonly Dictionary AlternateIsoCodeMappings = new () diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 5fcf8acda..a9de0dce1 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -229,6 +229,11 @@ namespace NzbDrone.Core.Parser languages.Add(Language.Kannada); } + if (lowerTitle.Contains("albanian")) + { + languages.Add(Language.Albanian); + } + // Case sensitive var caseSensitiveMatches = CaseSensitiveLanguageRegex.Matches(title);