From 55cff621397bd218bbad66bd48200f32f01cd015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 18 Aug 2020 09:12:01 -0400 Subject: [PATCH] Fix for #1074. --- bazarr/subsyncer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/subsyncer.py b/bazarr/subsyncer.py index b0cfa018c..0d85665a5 100644 --- a/bazarr/subsyncer.py +++ b/bazarr/subsyncer.py @@ -49,9 +49,11 @@ class SubSyncer: '{0}'.format(self.srtin)) else: if result['sync_was_successful']: + 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), result['offset_seconds'], - "{:.2f}".format(result['framerate_scale_factor'])) + "factor of {2}.".format(language_from_alpha3(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,