mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Fixed: Parsing some titles with FRA as French
This commit is contained in:
parent
576d404e70
commit
cfba047d80
3 changed files with 10 additions and 8 deletions
|
@ -52,6 +52,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Movie Title : Other Title 2010 x264.720p.Blu-ray Rip HD.VOSTFR.VFF. ONLY")]
|
||||
[TestCase("Movie Title 2019 HEVC.2160p.Blu-ray 4K.VOSTFR.VFF. JATO")]
|
||||
[TestCase("Movie.Title.1956.MULTi.VF.Bluray.1080p.REMUX.AC3.x264")]
|
||||
[TestCase("Movie.Title.2016.ENG-ITA-FRA.AAC.1080p.WebDL.x264")]
|
||||
[TestCase("Movie Title 2016 (BDrip 1080p ENG-ITA-FRA) Multisub x264")]
|
||||
[TestCase("Movie.Title.2016.ENG-ITA-FRE.AAC.1080p.WebDL.x264")]
|
||||
[TestCase("Movie Title 2016 (BDrip 1080p ENG-ITA-FRE) Multisub x264")]
|
||||
public void should_parse_language_french(string postTitle)
|
||||
|
|
|
@ -15,7 +15,8 @@ namespace NzbDrone.Core.Parser
|
|||
{
|
||||
private static readonly Logger Logger = NzbDroneLogger.GetLogger(typeof(LanguageParser));
|
||||
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_|^)(?<italian>\b(?:ita|italian)\b)|
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_|^)(?<english>\beng\b)|
|
||||
(?<italian>\b(?:ita|italian)\b)|
|
||||
(?<german>german\b|videomann|ger[. ]dub|\bger\b)|
|
||||
(?<flemish>flemish)|
|
||||
(?<bulgarian>bgaudio)|
|
||||
|
@ -24,7 +25,6 @@ namespace NzbDrone.Core.Parser
|
|||
(?<greek>greek)|
|
||||
(?<french>\b(?:FR|VO|VF|VFF|VFQ|VFI|VF2|TRUEFRENCH|FRENCH|FRE|FRA)\b)|
|
||||
(?<russian>\b(?:rus|ru)\b)|
|
||||
(?<english>\beng\b)|
|
||||
(?<hungarian>\b(?:HUNDUB|HUN)\b)|
|
||||
(?<hebrew>\b(?:HebDub|HebDubbed)\b)|
|
||||
(?<polish>\b(?:PL\W?DUB|DUB\W?PL|LEK\W?PL|PL\W?LEK)\b)|
|
||||
|
@ -297,6 +297,11 @@ namespace NzbDrone.Core.Parser
|
|||
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
if (match.Groups["english"].Success)
|
||||
{
|
||||
languages.Add(Language.English);
|
||||
}
|
||||
|
||||
if (match.Groups["italian"].Captures.Any())
|
||||
{
|
||||
languages.Add(Language.Italian);
|
||||
|
@ -327,11 +332,6 @@ namespace NzbDrone.Core.Parser
|
|||
languages.Add(Language.Russian);
|
||||
}
|
||||
|
||||
if (match.Groups["english"].Success)
|
||||
{
|
||||
languages.Add(Language.English);
|
||||
}
|
||||
|
||||
if (match.Groups["bulgarian"].Success)
|
||||
{
|
||||
languages.Add(Language.Bulgarian);
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace NzbDrone.Core.Parser
|
|||
private static readonly Regex CleanQualityBracketsRegex = new Regex(@"\[[a-z0-9 ._-]+\]$",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+(?<part2>-[a-z0-9]+)?(?!.+?(?:480p|576p|720p|1080p|2160p)))(?<!(?:WEB-(DL|Rip)|Blu-Ray|480p|576p|720p|1080p|2160p|DTS-HD|DTS-X|DTS-MA|DTS-ES|-ES|-EN|-CAT|-ENG|-JPN|-GER|-FRE|-ITA|-HDRip|\d{1,2}-bit|[ ._]\d{4}-\d{2}|-\d{2}|tmdb(id)?-(?<tmdbid>\d+)|(?<imdbid>tt\d{7,8}))(?:\k<part2>)?)(?:\b|[-._ ]|$)|[-._ ]\[(?<releasegroup>[a-z0-9]+)\]$",
|
||||
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+(?<part2>-[a-z0-9]+)?(?!.+?(?:480p|576p|720p|1080p|2160p)))(?<!(?:WEB-(DL|Rip)|Blu-Ray|480p|576p|720p|1080p|2160p|DTS-HD|DTS-X|DTS-MA|DTS-ES|-ES|-EN|-CAT|-ENG|-JPN|-GER|-FRA|-FRE|-ITA|-HDRip|\d{1,2}-bit|[ ._]\d{4}-\d{2}|-\d{2}|tmdb(id)?-(?<tmdbid>\d+)|(?<imdbid>tt\d{7,8}))(?:\k<part2>)?)(?:\b|[-._ ]|$)|[-._ ]\[(?<releasegroup>[a-z0-9]+)\]$",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex InvalidReleaseGroupRegex = new Regex(@"^([se]\d+|[0-9a-f]{8})$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue