1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00

Fixed: Parsing of RoDubbed releases as Romanian

This commit is contained in:
Bogdan 2023-03-13 23:25:16 +02:00 committed by Qstick
parent 89b609a221
commit 42c9e4e3e5
2 changed files with 7 additions and 1 deletions

View File

@ -147,6 +147,7 @@ public void should_parse_language_russian(string postTitle)
} }
[TestCase("Movie.Title.1994.Romanian.1080p.XviD-LOL")] [TestCase("Movie.Title.1994.Romanian.1080p.XviD-LOL")]
[TestCase("Movie.Title.1994.1080p.XviD.RoDubbed-LOL")]
public void should_parse_language_romanian(string postTitle) public void should_parse_language_romanian(string postTitle)
{ {
var result = Parser.Parser.ParseMovieTitle(postTitle, true); var result = Parser.Parser.ParseMovieTitle(postTitle, true);

View File

@ -3,7 +3,6 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Microsoft.Extensions.FileSystemGlobbing;
using NLog; using NLog;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Common.Instrumentation; using NzbDrone.Common.Instrumentation;
@ -19,6 +18,7 @@ public static class LanguageParser
(?<german>german\b|videomann|ger[. ]dub)| (?<german>german\b|videomann|ger[. ]dub)|
(?<flemish>flemish)| (?<flemish>flemish)|
(?<bulgarian>bgaudio)| (?<bulgarian>bgaudio)|
(?<romanian>rodubbed)|
(?<brazilian>dublado)| (?<brazilian>dublado)|
(?<greek>greek)| (?<greek>greek)|
(?<french>\b(?:FR|VO|VFF|VFQ|VFI|VF2|TRUEFRENCH|FRE|FRA)\b)| (?<french>\b(?:FR|VO|VFF|VFQ|VFI|VF2|TRUEFRENCH|FRE|FRA)\b)|
@ -331,6 +331,11 @@ public static List<Language> ParseLanguages(string title)
{ {
languages.Add(Language.Latvian); languages.Add(Language.Latvian);
} }
if (match.Groups["romanian"].Success)
{
languages.Add(Language.Romanian);
}
} }
if (!languages.Any()) if (!languages.Any())