This commit is contained in:
Louis Vézina 2020-07-27 07:31:15 -04:00
parent 37802e30cc
commit 30df4a8a2f
1 changed files with 24 additions and 18 deletions

View File

@ -94,12 +94,18 @@ class SubSyncer:
logging.debug('BAZARR FFmpeg used is %s', ffmpeg_exe)
self.ffmpeg_path = os.path.dirname(ffmpeg_exe)
try:
result = run(self)
except Exception as e:
logging.error('BAZARR an exception occurs during the synchronization process for this subtitles: ' +
self.srtin)
else:
if result['sync_was_successful']:
message = "{0} subtitles synchronization ended with an offset of {1} seconds and a framerate scale factor" \
" of {2} using {3} (0:{4}).".format(language_from_alpha3(srt_lang), result['offset_seconds'],
result['framerate_scale_factor'], using_what,
message = "{0} subtitles synchronization ended with an offset of {1} seconds and a framerate scale " \
"factor of {2} using {3} (0:{4}).".format(language_from_alpha3(srt_lang),
result['offset_seconds'],
result['framerate_scale_factor'],
using_what,
self.reference_stream)
if media_type == 'series':