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

This commit is contained in:
morpheus65535 2022-08-21 08:17:05 -04:00
parent bfd1af7c0c
commit c6efda0f75
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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