diff options
author | morpheus65535 <[email protected]> | 2024-10-17 11:38:58 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-10-17 11:38:58 -0400 |
commit | 56d8f2c9a36536f0d5c8e29b331dc3d01729042f (patch) | |
tree | f427ce81c7da91a5315c937f3f2a521069a9d476 | |
parent | a4cfb0077b31140b5a58a06c93ab96ec48e22cbf (diff) | |
download | bazarr-56d8f2c9a36536f0d5c8e29b331dc3d01729042f.tar.gz bazarr-56d8f2c9a36536f0d5c8e29b331dc3d01729042f.zip |
Fixed another issue with subtitles upgrade process.
-rw-r--r-- | bazarr/api/episodes/history.py | 2 | ||||
-rw-r--r-- | bazarr/api/movies/history.py | 2 | ||||
-rw-r--r-- | bazarr/subtitles/upgrade.py | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bazarr/api/episodes/history.py b/bazarr/api/episodes/history.py index 6ea13fb48..026397363 100644 --- a/bazarr/api/episodes/history.py +++ b/bazarr/api/episodes/history.py @@ -129,7 +129,7 @@ class EpisodesHistory(Resource): 'provider': x.provider, 'matches': x.matched, 'dont_matches': x.not_matched, - 'external_subtitles': [ast.literal_eval(f'"{y[1]}"') for y in ast.literal_eval(x.external_subtitles) if y[1]], + 'external_subtitles': [y[1] for y in ast.literal_eval(x.external_subtitles) if y[1]], 'upgradable': bool(x.upgradable) if _language_still_desired(x.language, x.profileId) else False, 'blacklisted': bool(x.blacklisted), } for x in database.execute(stmt).all()] diff --git a/bazarr/api/movies/history.py b/bazarr/api/movies/history.py index a5c4a802c..d7e7d6783 100644 --- a/bazarr/api/movies/history.py +++ b/bazarr/api/movies/history.py @@ -120,7 +120,7 @@ class MoviesHistory(Resource): 'video_path': x.video_path, 'matches': x.matched, 'dont_matches': x.not_matched, - 'external_subtitles': [ast.literal_eval(f'"{y[1]}"') for y in ast.literal_eval(x.external_subtitles) if y[1]], + 'external_subtitles': [y[1] for y in ast.literal_eval(x.external_subtitles) if y[1]], 'upgradable': bool(x.upgradable) if _language_still_desired(x.language, x.profileId) else False, 'blacklisted': bool(x.blacklisted), } for x in database.execute(stmt).all()] diff --git a/bazarr/subtitles/upgrade.py b/bazarr/subtitles/upgrade.py index 42cf6d3f7..1f73218a2 100644 --- a/bazarr/subtitles/upgrade.py +++ b/bazarr/subtitles/upgrade.py @@ -45,7 +45,7 @@ def upgrade_subtitles(): 'subtitles_path': x.subtitles_path, 'path': x.path, 'profileId': x.profileId, - 'external_subtitles': [ast.literal_eval(f'"{y[1]}"') for y in ast.literal_eval(x.external_subtitles) if y[1]], + 'external_subtitles': [y[1] for y in ast.literal_eval(x.external_subtitles) if y[1]], 'upgradable': bool(x.upgradable), } for x in database.execute( select(TableHistory.id, @@ -142,7 +142,7 @@ def upgrade_subtitles(): 'path': x.path, 'profileId': x.profileId, 'subtitles_path': x.subtitles_path, - 'external_subtitles': [ast.literal_eval(f'"{y[1]}"') for y in ast.literal_eval(x.external_subtitles) if y[1]], + 'external_subtitles': [y[1] for y in ast.literal_eval(x.external_subtitles) if y[1]], 'upgradable': bool(x.upgradable), } for x in database.execute( select(TableMovies.title, |