diff --git a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs index c2459dcfb..3d80d2e81 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs @@ -79,6 +79,7 @@ namespace NzbDrone.Core.Indexers.Definitions caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TV); caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD); caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVHD); + caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVUHD); return caps; } diff --git a/src/NzbDrone.Core/Parser/TvCategoryFromQualityParser.cs b/src/NzbDrone.Core/Parser/TvCategoryFromQualityParser.cs index 33a5275ce..156e8738b 100644 --- a/src/NzbDrone.Core/Parser/TvCategoryFromQualityParser.cs +++ b/src/NzbDrone.Core/Parser/TvCategoryFromQualityParser.cs @@ -5,7 +5,7 @@ namespace NzbDrone.Core.Parser { public static class TvCategoryFromQualityParser { - private static readonly Regex SourceRegex = new Regex(@"\b(?: + private static readonly Regex SourceRegex = new (@"\b(?: (?BluRay|Blu-Ray|HDDVD|BD)| (?WEB[-_. ]DL|WEBDL|WebRip|iTunesHD|WebHD)| (?HDTV)| @@ -19,16 +19,16 @@ namespace NzbDrone.Core.Parser )\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - private static readonly Regex RawHdRegex = new Regex(@"\b(?TrollHD|RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b", + private static readonly Regex RawHdRegex = new (@"\b(?TrollHD|RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?480p|640x480|848x480)|(?576p)|(?720p|1280x720)|(?1080p|1920x1080))\b", + private static readonly Regex ResolutionRegex = new (@"\b(?:(?480p|640x480|848x480)|(?576p)|(?720p|1280x720)|(?1080p|1920x1080)|(?2160p))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex CodecRegex = new Regex(@"\b(?:(?x264)|(?h264)|(?XvidHD)|(?Xvid)|(?divx))\b", + private static readonly Regex CodecRegex = new (@"\b(?:(?x264)|(?h264)|(?XvidHD)|(?Xvid)|(?divx))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex HighDefPdtvRegex = new Regex(@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex HighDefPdtvRegex = new (@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase); public static IndexerCategory ParseTvShowQuality(string tvShowFileName) { @@ -40,6 +40,11 @@ namespace NzbDrone.Core.Parser if (sourceMatch.Groups["webdl"].Success) { + if (resolutionMatch.Groups["q2160p"].Success) + { + return NewznabStandardCategory.TVUHD; + } + if (resolutionMatch.Groups["q1080p"].Success || resolutionMatch.Groups["q720p"].Success) { return NewznabStandardCategory.TVHD; @@ -53,6 +58,11 @@ namespace NzbDrone.Core.Parser if (sourceMatch.Groups["hdtv"].Success) { + if (resolutionMatch.Groups["q2160p"].Success) + { + return NewznabStandardCategory.TVUHD; + } + if (resolutionMatch.Groups["q1080p"].Success || resolutionMatch.Groups["q720p"].Success) { return NewznabStandardCategory.TVHD; @@ -70,6 +80,11 @@ namespace NzbDrone.Core.Parser return NewznabStandardCategory.TVSD; } + if (resolutionMatch.Groups["q2160p"].Success) + { + return NewznabStandardCategory.TVUHD; + } + if (resolutionMatch.Groups["q1080p"].Success || resolutionMatch.Groups["q720p"].Success) { return NewznabStandardCategory.TVHD;