From 7b740858b33ffc39f84b22685e8c5f48fd4419aa Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 10 Jun 2014 17:48:07 +0800 Subject: [PATCH] Fix for 1080p HDTV anime being recognized as bluray quality --- sickbeard/common.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sickbeard/common.py b/sickbeard/common.py index 7e49b641..fbbf8341 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -182,21 +182,25 @@ class Quality: checkName = lambda list, func: func([re.search(x, name, re.I) for x in list]) if anime: - blueRayOptions = checkName(["bluray", "blu-ray"], any) + dvdOptions = checkName(["dvd", "dvdrip"], any) + blueRayOptions = checkName(["bluray", "blu-ray", "BD"], any) + sdOptions = checkName(["360p", "480p", "848x480", "XviD"], any) hdOptions = checkName(["720p", "1280x720", "960x720"], any) fullHD = checkName(["1080p", "1920x1080"], any) - if checkName(["360p", "XviD"], any): + if sdOptions and not blueRayOptions and not dvdOptions: return Quality.SDTV - elif checkName(["dvd", "480p", "848x480"], any): + elif dvdOptions: return Quality.SDDVD elif hdOptions and not blueRayOptions and not fullHD: return Quality.HDTV + elif fullHD and not blueRayOptions and not hdOptions: + return Quality.FULLHDTV elif hdOptions and not blueRayOptions and not fullHD: return Quality.HDWEBDL elif blueRayOptions and hdOptions and not fullHD: return Quality.HDBLURAY - elif fullHD: + elif blueRayOptions and fullHD and not hdOptions: return Quality.FULLHDBLURAY else: return Quality.UNKNOWN