1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 15:12:23 -05:00

Fixed sickragetv/sickrage-issues#170 - checks if key 'language' is present if not discards.

This commit is contained in:
echel0n 2014-12-18 14:25:35 -08:00
parent ce7873584f
commit c65b17d09b

View File

@ -33,10 +33,10 @@ def process(mtree):
continue
def promote_subtitle():
# pylint: disable=W0631
node.guess.set('subtitleLanguage', node.guess['language'],
confidence=node.guess.confidence('language'))
del node.guess['language']
if 'language' in node.guess:
node.guess.set('subtitleLanguage', node.guess['language'],
confidence=node.guess.confidence('language'))
del node.guess['language']
# - if we matched a language in a file with a sub extension and that
# the group is the last group of the filename, it is probably the