summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2022-08-21 08:17:05 -0400
committermorpheus65535 <[email protected]>2022-08-21 08:17:05 -0400
commitc6efda0f75e338c72c76a26d33920267cc15a293 (patch)
tree974194bc742c6532c05a0f93f5a58639230163f4
parentbfd1af7c0cf0211abc49532bba22870856461d9d (diff)
downloadbazarr-c6efda0f75e338c72c76a26d33920267cc15a293.tar.gz
bazarr-c6efda0f75e338c72c76a26d33920267cc15a293.zip
Fixed None type issue on the first subtitles indexation for episodes or movies.
-rw-r--r--bazarr/subtitles/indexer/movies.py2
-rw-r--r--bazarr/subtitles/indexer/series.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/bazarr/subtitles/indexer/movies.py b/bazarr/subtitles/indexer/movies.py
index d83458d25..31f6529ea 100644
--- a/bazarr/subtitles/indexer/movies.py
+++ b/bazarr/subtitles/indexer/movies.py
@@ -77,7 +77,7 @@ def store_subtitles_movie(original_path, reversed_path, use_cache=True):
if not item:
previously_indexed_subtitles_to_exclude = []
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
if len(x) == 3 and
x[1] and
diff --git a/bazarr/subtitles/indexer/series.py b/bazarr/subtitles/indexer/series.py
index 4ce7e2228..002d039cf 100644
--- a/bazarr/subtitles/indexer/series.py
+++ b/bazarr/subtitles/indexer/series.py
@@ -75,7 +75,7 @@ def store_subtitles(original_path, reversed_path, use_cache=True):
if not item:
previously_indexed_subtitles_to_exclude = []
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
if len(x) == 3 and
x[1] and