Fix to embedded subs indexer.

pull/888/head
Louis Vézina 5 years ago
parent a36e54c7c7
commit c982e37024

@ -26,10 +26,10 @@ class EmbeddedSubsReader:
if 'subtitle' in data: if 'subtitle' in data:
for detected_language in data['subtitle']: for detected_language in data['subtitle']:
language = detected_language['language'].alpha3 if 'language' in detected_language:
forced = detected_language['forced'] if 'forced' in detected_language else None language = detected_language['language'].alpha3
codec = detected_language['format'] if 'format' in detected_language else None forced = detected_language['forced'] if 'forced' in detected_language else None
if language: codec = detected_language['format'] if 'format' in detected_language else None
subtitles_list.append([language, forced, codec]) subtitles_list.append([language, forced, codec])
else: else:
continue continue

Loading…
Cancel
Save