mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
New: Parsing of '[WEB]' as WebDL
Fixes #5742 (cherry picked from commit ba2ca7ee2929f8ed5411e11e9a96001a37723dcc)
This commit is contained in:
@@ -69,6 +69,7 @@ namespace NzbDrone.Core.Parser
|
||||
private static readonly Regex OtherSourceRegex = new Regex(@"(?<hdtv>HD[-_. ]TV)|(?<sdtv>SD[-_. ]TV)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex AnimeBlurayRegex = new Regex(@"bd(?:720|1080|2160)|(?<=[-_. (\[])bd(?=[-_. )\]])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex AnimeWebDlRegex = new Regex(@"\[WEB\]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex HighDefPdtvRegex = new Regex(@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
@@ -425,6 +426,39 @@ namespace NzbDrone.Core.Parser
|
||||
return result;
|
||||
}
|
||||
|
||||
if (AnimeWebDlRegex.Match(normalizedName).Success)
|
||||
{
|
||||
result.SourceDetectionSource = QualityDetectionSource.Name;
|
||||
|
||||
if (resolution == Resolution.R360p || resolution == Resolution.R480p ||
|
||||
resolution == Resolution.R576p || normalizedName.ContainsIgnoreCase("480p"))
|
||||
{
|
||||
result.ResolutionDetectionSource = QualityDetectionSource.Name;
|
||||
result.Quality = Quality.WEBDL480p;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution.R1080p || normalizedName.ContainsIgnoreCase("1080p"))
|
||||
{
|
||||
result.ResolutionDetectionSource = QualityDetectionSource.Name;
|
||||
result.Quality = Quality.WEBDL1080p;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution.R2160p || normalizedName.ContainsIgnoreCase("2160p"))
|
||||
{
|
||||
result.ResolutionDetectionSource = QualityDetectionSource.Name;
|
||||
result.Quality = Quality.WEBDL2160p;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Quality = Quality.WEBDL720p;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution != Resolution.Unknown)
|
||||
{
|
||||
var source = Source.UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user