Merge pull request #596 from adam111316/anime-1080p-fix

Fix for 1080p HDTV anime
This commit is contained in:
echel0n 2014-06-19 09:43:48 -07:00
commit a43d7b7593

View file

@ -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