mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Anime!
New: Anime support New: pull alternate names from thexem.de New: Search using all alternate names (if rage ID is unavailable) New: Show scene mapping information when hovering over episode number New: Full season searching for anime (searches for each episode) New: animezb.com anime indexer New: Treat BD as bluray Fixed: Parsing of 2 digit absolute episode numbers Fixed: Loading series details page for series that start with period Fixed: Return 0 results when manual search fails, instead of an error Fixed: animezb URL
This commit is contained in:
@@ -31,7 +31,7 @@ namespace NzbDrone.Core.Parser
|
||||
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper|repack)\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<_480p>480p)|(?<_576p>576p)|(?<_720p>720p)|(?<_1080p>1080p))\b",
|
||||
private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<_480p>480p|640x480)|(?<_576p>576p)|(?<_720p>720p)|(?<_1080p>1080p))\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<x264>x264)|(?<h264>h264)|(?<xvidhd>XvidHD)|(?<xvid>Xvid)|(?<divx>divx))\b",
|
||||
@@ -39,6 +39,8 @@ 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)|(?<=\[|\(|\s)bd(?=\s|\)|\])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static QualityModel ParseQuality(string name)
|
||||
{
|
||||
Logger.Debug("Trying to parse quality for {0}", name);
|
||||
@@ -165,6 +167,25 @@ namespace NzbDrone.Core.Parser
|
||||
return result;
|
||||
}
|
||||
|
||||
//Anime Bluray matching
|
||||
if (AnimeBlurayRegex.Match(normalizedName).Success)
|
||||
{
|
||||
if (resolution == Resolution._480p || resolution == Resolution._576p || normalizedName.Contains("480p"))
|
||||
{
|
||||
result.Quality = Quality.DVD;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution._1080p || normalizedName.Contains("1080p"))
|
||||
{
|
||||
result.Quality = Quality.Bluray1080p;
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Quality = Quality.Bluray720p;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution._1080p)
|
||||
{
|
||||
result.Quality = Quality.HDTV1080p;
|
||||
@@ -177,12 +198,48 @@ namespace NzbDrone.Core.Parser
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution._480p)
|
||||
{
|
||||
result.Quality = Quality.SDTV;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (codecRegex.Groups["x264"].Success)
|
||||
{
|
||||
result.Quality = Quality.SDTV;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (normalizedName.Contains("848x480"))
|
||||
{
|
||||
if (normalizedName.Contains("dvd"))
|
||||
{
|
||||
result.Quality = Quality.DVD;
|
||||
}
|
||||
|
||||
result.Quality = Quality.SDTV;
|
||||
}
|
||||
|
||||
if (normalizedName.Contains("1280x720"))
|
||||
{
|
||||
if (normalizedName.Contains("bluray"))
|
||||
{
|
||||
result.Quality = Quality.Bluray720p;
|
||||
}
|
||||
|
||||
result.Quality = Quality.HDTV720p;
|
||||
}
|
||||
|
||||
if (normalizedName.Contains("1920x1080"))
|
||||
{
|
||||
if (normalizedName.Contains("bluray"))
|
||||
{
|
||||
result.Quality = Quality.Bluray1080p;
|
||||
}
|
||||
|
||||
result.Quality = Quality.HDTV1080p;
|
||||
}
|
||||
|
||||
if (normalizedName.Contains("bluray720p"))
|
||||
{
|
||||
result.Quality = Quality.Bluray720p;
|
||||
|
||||
Reference in New Issue
Block a user