aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-05-01 00:00:50 -0400
committermorpheus65535 <[email protected]>2021-05-01 00:00:50 -0400
commit84a20a3146e52870908ae5182af832cc557a2ce8 (patch)
tree83b817df9020eec4504c60219328e59323b7fe10
parent6b1d71282b6fd74fe5420cdc90dd24bf6f173306 (diff)
downloadbazarr-84a20a3146e52870908ae5182af832cc557a2ce8.tar.gz
bazarr-84a20a3146e52870908ae5182af832cc557a2ce8.zip
Fix for manual subsync history logging
-rw-r--r--bazarr/subsyncer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bazarr/subsyncer.py b/bazarr/subsyncer.py
index 7910956d8..daeff09e2 100644
--- a/bazarr/subsyncer.py
+++ b/bazarr/subsyncer.py
@@ -3,7 +3,7 @@ import os
from ffsubsync.ffsubsync import run, make_parser
from utils import get_binary
from utils import history_log, history_log_movie
-from get_languages import alpha2_from_alpha3, language_from_alpha3
+from get_languages import language_from_alpha2
from helper import path_mappings
from config import settings
from get_args import args
@@ -66,17 +66,17 @@ class SubSyncer:
offset_seconds = result['offset_seconds'] or 0
framerate_scale_factor = result['framerate_scale_factor'] or 0
message = "{0} subtitles synchronization ended with an offset of {1} seconds and a framerate " \
- "scale factor of {2}.".format(language_from_alpha3(srt_lang), offset_seconds,
+ "scale factor of {2}.".format(language_from_alpha2(srt_lang), offset_seconds,
"{:.2f}".format(framerate_scale_factor))
if media_type == 'series':
history_log(action=5, sonarr_series_id=sonarr_series_id, sonarr_episode_id=sonarr_episode_id,
description=message, video_path=path_mappings.path_replace_reverse(self.reference),
- language=alpha2_from_alpha3(srt_lang), subtitles_path=srt_path)
+ language=srt_lang, subtitles_path=srt_path)
else:
history_log_movie(action=5, radarr_id=radarr_id, description=message,
video_path=path_mappings.path_replace_reverse_movie(self.reference),
- language=alpha2_from_alpha3(srt_lang), subtitles_path=srt_path)
+ language=srt_lang, subtitles_path=srt_path)
else:
logging.error('BAZARR unable to sync subtitles: {0}'.format(self.srtin))