1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Moved scene conversion routine in Name Parser to end so that it only converts the best result match and not every single one wasting time and cycles.

This commit is contained in:
echel0n 2014-06-22 10:27:00 -07:00
parent 3e78004d36
commit 7defffb4f1

View File

@ -231,17 +231,18 @@ class NameParser(object):
elif getattr(self.showObj, 'anime', None) and len(result.ab_episode_numbers): elif getattr(self.showObj, 'anime', None) and len(result.ab_episode_numbers):
result.score += 1 result.score += 1
if self.convert:
result = result.convert()
result.score += 1 result.score += 1
matches.append(result) matches.append(result)
if len(matches): if len(matches):
result = max(matches, key=lambda x: x.score) result = max(matches, key=lambda x: x.score)
# get quality
if result.show: if result.show:
if self.convert:
# scene convert result
result = result.convert()
# get quality
result.quality = common.Quality.nameQuality(name, bool(result.show and result.show.is_anime)) result.quality = common.Quality.nameQuality(name, bool(result.show and result.show.is_anime))
return result return result