diff options
author | morpheus65535 <[email protected]> | 2023-08-04 09:45:56 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2023-08-04 09:45:56 -0400 |
commit | fa423469688e553270670eb604931abe1a6bee70 (patch) | |
tree | 687ce6ea71e2ed20b9cba0af45396f227f57a00f | |
parent | e0e5daea1de2ac8b6cbd0aa53ba284de70d5297c (diff) | |
download | bazarr-fa423469688e553270670eb604931abe1a6bee70.tar.gz bazarr-fa423469688e553270670eb604931abe1a6bee70.zip |
Fixed translation issue for episodes subtitles. #2214
-rw-r--r-- | bazarr/api/subtitles/subtitles.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bazarr/api/subtitles/subtitles.py b/bazarr/api/subtitles/subtitles.py index 3184d3eb2..f71081220 100644 --- a/bazarr/api/subtitles/subtitles.py +++ b/bazarr/api/subtitles/subtitles.py @@ -78,7 +78,7 @@ class Subtitles(Resource): if media_type == 'episode': subsync.sync(video_path=video_path, srt_path=subtitles_path, srt_lang=language, media_type='series', sonarr_series_id=metadata.sonarrSeriesId, - sonarr_episode_id=int(id)) + sonarr_episode_id=id) else: subsync.sync(video_path=video_path, srt_path=subtitles_path, srt_lang=language, media_type='movies', radarr_id=id) @@ -92,8 +92,8 @@ class Subtitles(Resource): translate_subtitles_file(video_path=video_path, source_srt_file=subtitles_path, from_lang=from_language, to_lang=dest_language, forced=forced, hi=hi, media_type="series" if media_type == "episode" else "movies", - sonarr_series_id=metadata.sonarrSeriesId, - sonarr_episode_id=int(id), + sonarr_series_id=metadata.sonarrSeriesId if media_type == "episode" else None, + sonarr_episode_id=id, radarr_id=id) else: use_original_format = True if args.get('original_format') == 'true' else False @@ -109,10 +109,10 @@ class Subtitles(Resource): if media_type == 'episode': store_subtitles(path_mappings.path_replace_reverse(video_path), video_path) event_stream(type='series', payload=metadata.sonarrSeriesId) - event_stream(type='episode', payload=int(id)) + event_stream(type='episode', payload=id) else: store_subtitles_movie(path_mappings.path_replace_reverse_movie(video_path), video_path) - event_stream(type='movie', payload=int(id)) + event_stream(type='movie', payload=id) return '', 204 |