Don't guess quality to loose. fixes #151 #109

This commit is contained in:
Ruud
2012-04-30 11:26:48 +02:00
parent bbc54cfc2e
commit e319371ba5
2 changed files with 12 additions and 8 deletions
+6 -5
View File
@@ -184,16 +184,17 @@ class QualityPlugin(Plugin):
# Check on unreliable stuff
if loose:
# Check extension + filesize
if list(set(quality.get('ext', [])) & set(words)) and size >= quality['size_min'] and size <= quality['size_max']:
log.debug('Found %s via ext %s in %s' % (quality['identifier'], quality.get('ext'), words))
return self.setCache(hash, quality)
# Last check on resolution only
if quality.get('width', 480) == extra.get('resolution_width', 0):
log.debug('Found %s via resolution_width: %s == %s' % (quality['identifier'], quality.get('width', 480), extra.get('resolution_width', 0)))
return self.setCache(hash, quality)
# Check extension + filesize
if list(set(quality.get('ext', [])) & set(words)) and size >= quality['size_min'] and size <= quality['size_max']:
log.debug('Found %s via ext and filesize %s in %s' % (quality['identifier'], quality.get('ext'), words))
return self.setCache(hash, quality)
# Try again with loose testing
if not loose:
@@ -202,4 +203,4 @@ class QualityPlugin(Plugin):
return self.setCache(hash, quality)
log.debug('Could not identify quality for: %s' % files)
return self.setCache(hash, self.single('dvdrip'))
return None