Fixed None type issue on the first subtitles indexation for episodes or movies.

pull/1930/head
morpheus65535 2 years ago
parent bfd1af7c0c
commit c6efda0f75

@ -77,7 +77,7 @@ def store_subtitles_movie(original_path, reversed_path, use_cache=True):
if not item: if not item:
previously_indexed_subtitles_to_exclude = [] previously_indexed_subtitles_to_exclude = []
else: else:
previously_indexed_subtitles = ast.literal_eval(item['subtitles']) previously_indexed_subtitles = ast.literal_eval(item['subtitles']) if item['subtitles'] else []
previously_indexed_subtitles_to_exclude = [x for x in previously_indexed_subtitles previously_indexed_subtitles_to_exclude = [x for x in previously_indexed_subtitles
if len(x) == 3 and if len(x) == 3 and
x[1] and x[1] and

@ -75,7 +75,7 @@ def store_subtitles(original_path, reversed_path, use_cache=True):
if not item: if not item:
previously_indexed_subtitles_to_exclude = [] previously_indexed_subtitles_to_exclude = []
else: else:
previously_indexed_subtitles = ast.literal_eval(item['subtitles']) previously_indexed_subtitles = ast.literal_eval(item['subtitles']) if item['subtitles'] else []
previously_indexed_subtitles_to_exclude = [x for x in previously_indexed_subtitles previously_indexed_subtitles_to_exclude = [x for x in previously_indexed_subtitles
if len(x) == 3 and if len(x) == 3 and
x[1] and x[1] and

Loading…
Cancel
Save