From 280d5535f7f4f555ae422a21bab50dbab19f8187 Mon Sep 17 00:00:00 2001 From: Ajit Date: Sat, 17 Feb 2024 21:57:23 +0530 Subject: [PATCH] fix: don't report sync as successful if best score is in negatives --- ffsubsync/ffsubsync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffsubsync/ffsubsync.py b/ffsubsync/ffsubsync.py index 41b0c40..b0114cc 100755 --- a/ffsubsync/ffsubsync.py +++ b/ffsubsync/ffsubsync.py @@ -178,6 +178,8 @@ def try_sync( reference_pipe.transform(args.reference), srt_pipes, ) + if best_score < 0: + sync_was_successful = False logger.info("...done") offset_seconds = ( offset_samples / float(SAMPLE_RATE) + args.apply_offset_seconds