Browse Source

Only allow 3d tag as single word, not partial. fix #3368

pull/3423/head
Ruud 11 years ago
parent
commit
bff05925e8
  1. 14
      couchpotato/core/plugins/quality/main.py

14
couchpotato/core/plugins/quality/main.py

@ -37,7 +37,7 @@ class QualityPlugin(Plugin):
threed_tags = { threed_tags = {
'sbs': [('half', 'sbs'), 'hsbs', ('full', 'sbs'), 'fsbs'], 'sbs': [('half', 'sbs'), 'hsbs', ('full', 'sbs'), 'fsbs'],
'ou': [('half', 'ou'), 'hou', ('full', 'ou'), 'fou'], 'ou': [('half', 'ou'), 'hou', ('full', 'ou'), 'fou'],
'3d': ['2d3d', '3d2d'], '3d': ['2d3d', '3d2d', '3d'],
} }
cached_qualities = None cached_qualities = None
@ -290,14 +290,14 @@ class QualityPlugin(Plugin):
tags = self.threed_tags.get(key, []) tags = self.threed_tags.get(key, [])
for tag in tags: for tag in tags:
if (isinstance(tag, tuple) and '.'.join(tag) in '.'.join(words)) or (isinstance(tag, (str, unicode)) and ss(tag.lower()) in cur_file.lower()): if isinstance(tag, tuple):
if len(set(words) & set(tag)) == len(tag):
log.debug('Found %s in %s', (tag, cur_file))
return 1, key
elif tag in words:
log.debug('Found %s in %s', (tag, cur_file)) log.debug('Found %s in %s', (tag, cur_file))
return 1, key return 1, key
if list(set([key]) & set(words)):
log.debug('Found %s in %s', (key, cur_file))
return 1, key
return 0, None return 0, None
def guessLooseScore(self, quality, extra = None): def guessLooseScore(self, quality, extra = None):
@ -423,6 +423,8 @@ class QualityPlugin(Plugin):
'Movie Monuments 2013 BrRip 1080p': {'size': 1800, 'quality': 'brrip'}, 'Movie Monuments 2013 BrRip 1080p': {'size': 1800, 'quality': 'brrip'},
'Movie Monuments 2013 BrRip 720p': {'size': 1300, 'quality': 'brrip'}, 'Movie Monuments 2013 BrRip 720p': {'size': 1300, 'quality': 'brrip'},
'The.Movie.2014.3D.1080p.BluRay.AVC.DTS-HD.MA.5.1-GroupName': {'size': 30000, 'quality': 'bd50', 'is_3d': True}, 'The.Movie.2014.3D.1080p.BluRay.AVC.DTS-HD.MA.5.1-GroupName': {'size': 30000, 'quality': 'bd50', 'is_3d': True},
'/home/namehou/Movie Monuments (2013)/Movie Monuments.mkv': {'size': 4500, 'quality': '1080p', 'is_3d': False},
'/home/namehou/Movie Monuments (2013)/Movie Monuments Full-OU.mkv': {'size': 4500, 'quality': '1080p', 'is_3d': True}
} }
correct = 0 correct = 0

Loading…
Cancel
Save