Correctly set manual timings if audio offset != 0 #111
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.
This fixes a bug which is present if video and audio were downloaded from different sources and don't align perfectly. So, mpv's
add audio-delay
is used to align them.In such a case, when cards are updated via
mpvacious-update-last-note
mpvacious works as expected.subs_observer.set_to_current_sub
also works fine because it relies on the sub timing. But when setting timings manually (as with the functions involved in this PR), the audio delay is not taken into account. As such, audio on the final card is off by the value of the offset audio.You can test this by adding an audio delay, opening the mpvacious menu and pressing
s
/e
to set the timings manually, andc
to use the current sub timing. Assuming you're at the beginning / end of the sub, these values should be the same.