Fix for 1080p HDTV anime being recognized as bluray quality

This commit is contained in:
Adam 2014-06-10 17:48:07 +08:00
parent a742c27f09
commit 7b740858b3
1 changed files with 8 additions and 4 deletions

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