|
|
@ -194,13 +194,16 @@ class QualityPlugin(Plugin): |
|
|
|
def containsTag(self, quality, words, cur_file = ''): |
|
|
|
|
|
|
|
# Check alt and tags |
|
|
|
for tag_type in ['alternative', 'tags']: |
|
|
|
for alt in quality.get(tag_type, []): |
|
|
|
if isinstance(alt, tuple) and '.'.join(alt) in '.'.join(words): |
|
|
|
for tag_type in ['alternative', 'tags', 'label']: |
|
|
|
qualities = quality.get(tag_type, []) |
|
|
|
qualities = [qualities] if isinstance(qualities, (str, unicode)) else qualities |
|
|
|
|
|
|
|
for alt in qualities: |
|
|
|
if (isinstance(alt, tuple) and '.'.join(alt) in '.'.join(words)) or (isinstance(alt, (str, unicode)) and alt.lower() in cur_file.lower()): |
|
|
|
log.debug('Found %s via %s %s in %s', (quality['identifier'], tag_type, quality.get(tag_type), cur_file)) |
|
|
|
return True |
|
|
|
|
|
|
|
if list(set(quality.get(tag_type, [])) & set(words)): |
|
|
|
if list(set(qualities) & set(words)): |
|
|
|
log.debug('Found %s via %s %s in %s', (quality['identifier'], tag_type, quality.get(tag_type), cur_file)) |
|
|
|
return True |
|
|
|
|
|
|
|