mirror of https://github.com/Radarr/Radarr
Treating FR as french, better parsing for weird DVD releases
This commit is contained in:
parent
d1de6c1b2c
commit
561e78df8b
|
@ -353,6 +353,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("H.Polukatoikia.S03E13.Greek.PDTV.XviD-Ouzo", Language.Greek)]
|
||||
[TestCase("Burn.Notice.S04E15.Brotherly.Love.GERMAN.DUBBED.WS.WEBRiP.XviD.REPACK-TVP", Language.German)]
|
||||
[TestCase("Ray Donovan - S01E01.720p.HDtv.x264-Evolve (NLsub)", Language.Norwegian)]
|
||||
[TestCase("Shield,.The.1x13.Tueurs.De.Flics.FR.DVDRip.XviD", Language.French)]
|
||||
public void parse_language(string postTitle, Language language)
|
||||
{
|
||||
var result = Parser.Parser.ParseTitle(postTitle);
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
new object[] { "WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", false },
|
||||
new object[] { "The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", false },
|
||||
new object[] { "The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", false },
|
||||
new object[] { "the.shield.1x13.circles.ws.xvidvd-tns", false}
|
||||
};
|
||||
|
||||
public static object[] Webdl480pCases =
|
||||
|
|
|
@ -74,7 +74,8 @@ namespace NzbDrone.Core.Parser
|
|||
|
||||
private static readonly Regex MultiPartCleanupRegex = new Regex(@"\(\d+\)$", RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>ita|italian)|(?<german>german\b)|(?<flemish>flemish)|(?<greek>greek)(?:\W|_)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>ita|italian)|(?<german>german\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)FR)(?:\W|_)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
public static ParsedEpisodeInfo ParsePath(string path)
|
||||
{
|
||||
|
@ -312,6 +313,9 @@ namespace NzbDrone.Core.Parser
|
|||
if (match.Groups["greek"].Captures.Cast<Capture>().Any())
|
||||
return Language.Greek;
|
||||
|
||||
if (match.Groups["french"].Success)
|
||||
return Language.French;
|
||||
|
||||
return Language.English;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.Parser
|
|||
private static readonly Regex SourceRegex = new Regex(@"(?<bluray>BluRay)|
|
||||
(?<webdl>WEB-DL|WEBDL|WEB\sDL|WEB\-DL|WebRip)|
|
||||
(?<hdtv>HDTV)|
|
||||
(?<bdrip>BDRiP)|(?<brrip>BRRip)|(?<dvd>\bDVD\b|DVDRip|NTSC|PAL)|
|
||||
(?<bdrip>BDRiP)|(?<brrip>BRRip)|(?<dvd>\bDVD\b|DVDRip|NTSC|PAL|xvidvd)|
|
||||
(?<dsr>WS\sDSR|WS_DSR|WS\.DSR|DSR)|(?<pdtv>PDTV)|(?<sdtv>SDTV)",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
|
|
Loading…
Reference in New Issue