From ac6dddd6073708d484fe40928cc65db0a66803a5 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 20 Apr 2023 21:30:43 -0400 Subject: [PATCH] Fixed upgrade of non-existant subtitles files --- bazarr/subtitles/upgrade.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bazarr/subtitles/upgrade.py b/bazarr/subtitles/upgrade.py index e292f1621..746d4ccde 100644 --- a/bazarr/subtitles/upgrade.py +++ b/bazarr/subtitles/upgrade.py @@ -138,6 +138,9 @@ def parse_upgradable_list(upgradable_list, perfect_score, media_type): for item in upgradable_list: logging.debug(f"Trying to validate eligibility to upgrade for this subtitles: " f"{item['subtitles_path']}") + if not os.path.exists(path_replace_method(item['subtitles_path'])): + logging.debug("Subtitles file doesn't exists anymore, we skip this one.") + continue if (item['video_path'], item['language']) in \ [(x['video_path'], x['language']) for x in items_to_upgrade]: logging.debug("Newer video path and subtitles language combination already in list of subtitles to "