mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Fixed some parsing issues
Fixed: Releases getting picked up as SDTV instead of RAW-HD Fixed: Don't parse "sample" as release group
This commit is contained in:
parent
a182102ee1
commit
8a7673ed13
4 changed files with 5 additions and 2 deletions
|
@ -195,6 +195,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Game of Thrones S04E10 1080i HDTV MPEG2 DD5.1-CtrlHD.ts", false)]
|
||||
[TestCase("VICE.S02E05.1080i.HDTV.DD2.0.MPEG2-NTb.ts", false)]
|
||||
[TestCase("Show - S03E01 - Episode Title Raw-HD.ts", false)]
|
||||
[TestCase("Saturday.Night.Live.Vintage.S10E09.Eddie.Murphy.The.Honeydrippers.1080i.UPSCALE.HDTV.DD5.1.MPEG2-zebra", false)]
|
||||
[TestCase("The.Colbert.Report.2011-08-04.1080i.HDTV.MPEG-2-CtrlHD", false)]
|
||||
public void should_parse_raw_quality(string title, bool proper)
|
||||
{
|
||||
ParseAndVerifyQuality(title, Quality.RAWHD, proper);
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Blue.Bloods.S05E11.720p.HDTV.X264-DIMENSION-NZBgeek", "DIMENSION")]
|
||||
[TestCase("Lost.S04E04.720p.BluRay.x264-xHD-1", "xHD")]
|
||||
[TestCase("Blue.Bloods.S05E11.720p.HDTV.X264-DIMENSION-1", "DIMENSION")]
|
||||
[TestCase("saturday.night.live.s40e11.kevin.hart_sia.720p.hdtv.x264-w4f-sample.mkv", "w4f")]
|
||||
public void should_not_include_repost_in_release_group(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
|
|
|
@ -165,7 +165,7 @@ namespace NzbDrone.Core.Parser
|
|||
private static readonly Regex SixDigitAirDateRegex = new Regex(@"(?<=[_.-])(?<airdate>(?<!\d)(?<airyear>[1-9]\d{1})(?<airmonth>[0-1][0-9])(?<airday>[0-3][0-9]))(?=[_.-])",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex CleanReleaseGroupRegex = new Regex(@"^(\[\s.+?\s\])|-(RP|1|NZBGeek)$",
|
||||
private static readonly Regex CleanReleaseGroupRegex = new Regex(@"^(\[\s.+?\s\])|-(RP|1|NZBGeek|sample)$",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+)\b(?<!WEB-DL|480p|720p|1080p)",
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Parser
|
|||
)\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>TrollHD|RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD)\b",
|
||||
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>TrollHD|RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper|repack)\b",
|
||||
|
|
Loading…
Reference in a new issue