diff options
author | morpheus65535 <[email protected]> | 2024-07-02 23:20:08 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-07-02 23:20:08 -0400 |
commit | a4527a7942fca4c0fe28ec5a2cdad56ee569800c (patch) | |
tree | 5bf1b19db6d19065e93ca06ca28462758c24d3ea | |
parent | 3cbfe08116cbf0ec94ce8cdff30ebd114fe9fd48 (diff) | |
download | bazarr-1.4.4-beta.15.tar.gz bazarr-1.4.4-beta.15.zip |
Fixed the subtitles upgrade process loop for normal subtitles upgraded to HI subtitles.v1.4.4-beta.15
-rw-r--r-- | bazarr/subtitles/upgrade.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bazarr/subtitles/upgrade.py b/bazarr/subtitles/upgrade.py index 4593c71bc..1c565bd0d 100644 --- a/bazarr/subtitles/upgrade.py +++ b/bazarr/subtitles/upgrade.py @@ -69,14 +69,12 @@ def upgrade_subtitles(): .join(TableEpisodes, onclause=TableHistory.sonarrEpisodeId == TableEpisodes.sonarrEpisodeId) .join(episodes_to_upgrade, onclause=TableHistory.id == episodes_to_upgrade.c.id, isouter=True) .where(episodes_to_upgrade.c.id.is_not(None))) - .all() if _language_still_desired(x.language, x.profileId)] + .all() if _language_still_desired(x.language, x.profileId) and + x.subtitles_path in x.external_subtitles and + x.video_path == x.path + ] for item in episodes_data: - if item['upgradable']: - if item['subtitles_path'] not in item['external_subtitles'] or \ - not item['video_path'] == item['path']: - item.update({"upgradable": False}) - del item['path'] del item['external_subtitles'] @@ -156,14 +154,12 @@ def upgrade_subtitles(): .join(TableMovies, onclause=TableHistoryMovie.radarrId == TableMovies.radarrId) .join(movies_to_upgrade, onclause=TableHistoryMovie.id == movies_to_upgrade.c.id, isouter=True) .where(movies_to_upgrade.c.id.is_not(None))) - .all() if _language_still_desired(x.language, x.profileId)] + .all() if _language_still_desired(x.language, x.profileId) and + x.subtitles_path in x.external_subtitles and + x.video_path == x.path + ] for item in movies_data: - if item['upgradable']: - if item['subtitles_path'] not in item['external_subtitles'] or \ - not item['video_path'] == item['path']: - item.update({"upgradable": False}) - del item['path'] del item['external_subtitles'] |