fix(subsync): read automatic sync settings at runtime#3363
Merged
morpheus65535 merged 1 commit intoJun 16, 2026
Merged
Conversation
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automatic subtitle sync was using
max_offset_seconds,gss, andno_fix_frameratevalues captured whensync.pywas imported. If those settings were changed later, automatic sync would keep using the old values, needing a restart of Bazarr to get picked up.This moves those defaults back into the function body so automatic sync reads the current settings when it runs. Explicit values passed by manual sync are left unchanged.
This fixes the automatic sync settings affected by this import-time default issue:
This does not change every sync-related option. For example,
force_audio("Always use Audio Track as Reference for Syncing") is already read later inSubSyncer.sync(), so it is not part of this fix.This is the same class of bug fixed by #2414 for #2413. It appears to have been reintroduced in f5d6721 when job manager support was added to subtitle sync.
#2449 is related because the reported behaviour there, automatic sync ignoring the configured Golden-Section Search value while manual sync works, follows from the same import-time default issue.
Test plan
Notes:
setuptools<81in the disposable test container because the current test harness importspkg_resourcesfromtests/conftest.py, and it looks like the dev container has setuptools 82.0.1 where that import doesn't seem to work.Manual testing
Tested inside the provided Dev docker container (which is Python 3.12)