Fix: VLC doesn't restart playback from the beginning as expected (#2050)

## Description

When resetting the watch state or choosing to start from the beginning,
the "from_start" flag isn't passed to VLC. Because of that, VLC doesn't
restart playback from the beginning as expected.

This change adds the flag when needed so VLC starts from the correct
position.

## AI or LLM usage

я использовал Codex

Co-authored-by: osipovgleb <19697793+osipovgleb@users.noreply.github.com>
This commit is contained in:
osipovgleb 2026-10-26 21:05:37 +03:00 • committed by GitHub
parent 962a14d5db
commit de67bccb39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 273 additions and 0 deletions

View file

@ -243,6 +243,8 @@ class PlayExternalViewModel
}
// VLC
// A zero position alone does not override VLC's saved resume position.
putExtra("from_start", positionMs == 0L)
if (subtitleUrls.isNotEmpty()) {
putExtra("subtitles_location", subtitleUrls.first().toString())
}