@@ -184,16 +184,17 @@ class QualityPlugin(Plugin):
|
|||||||
|
|
||||||
# Check on unreliable stuff
|
# Check on unreliable stuff
|
||||||
if loose:
|
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
|
# Last check on resolution only
|
||||||
if quality.get('width', 480) == extra.get('resolution_width', 0):
|
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)))
|
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)
|
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
|
# Try again with loose testing
|
||||||
if not loose:
|
if not loose:
|
||||||
@@ -202,4 +203,4 @@ class QualityPlugin(Plugin):
|
|||||||
return self.setCache(hash, quality)
|
return self.setCache(hash, quality)
|
||||||
|
|
||||||
log.debug('Could not identify quality for: %s' % files)
|
log.debug('Could not identify quality for: %s' % files)
|
||||||
return self.setCache(hash, self.single('dvdrip'))
|
return None
|
||||||
|
|||||||
@@ -180,15 +180,18 @@ class Scanner(Plugin):
|
|||||||
|
|
||||||
# Normal identifier
|
# Normal identifier
|
||||||
identifier = self.createStringIdentifier(file_path, folder, exclude_filename = is_dvd_file)
|
identifier = self.createStringIdentifier(file_path, folder, exclude_filename = is_dvd_file)
|
||||||
|
identifiers = [identifier]
|
||||||
|
|
||||||
# Identifier with quality
|
# Identifier with quality
|
||||||
quality = fireEvent('quality.guess', [file_path], single = True) if not is_dvd_file else {'identifier':'dvdr'}
|
quality = fireEvent('quality.guess', [file_path], single = True) if not is_dvd_file else {'identifier':'dvdr'}
|
||||||
identifier_with_quality = '%s %s' % (identifier, quality.get('identifier', ''))
|
if quality:
|
||||||
|
identifier_with_quality = '%s %s' % (identifier, quality.get('identifier', ''))
|
||||||
|
identifiers = [identifier_with_quality, identifier]
|
||||||
|
|
||||||
if not movie_files.get(identifier):
|
if not movie_files.get(identifier):
|
||||||
movie_files[identifier] = {
|
movie_files[identifier] = {
|
||||||
'unsorted_files': [],
|
'unsorted_files': [],
|
||||||
'identifiers': [identifier_with_quality, identifier],
|
'identifiers': identifiers,
|
||||||
'is_dvd': is_dvd_file,
|
'is_dvd': is_dvd_file,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,7 +498,7 @@ class Scanner(Plugin):
|
|||||||
'identifier': imdb_id
|
'identifier': imdb_id
|
||||||
}, update_after = False, single = True)
|
}, update_after = False, single = True)
|
||||||
|
|
||||||
log.error('No imdb_id found for %s.' % group['identifiers'])
|
log.error('No imdb_id found for %s. Add a NFO file with IMDB id or add the year to the filename.' % group['identifiers'])
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def getCPImdb(self, string):
|
def getCPImdb(self, string):
|
||||||
|
|||||||
Reference in New Issue
Block a user