fix(mpv): reset per-file state when a same-file reload skips the path clear (#323)

mpv only sends the latest value of an observed property, and only after its
IPC thread has handled queued commands and events. A same-file
`loadfile replace` can therefore arrive with no `path=null`, so path
comparisons see no change, the autoplay gate stays released for that path and
drops every ready signal, and playback stays paused.

Track an `end-file` that mpv has not followed with a different path. If it is
still pending at `file-loaded`, replay the clear and read the path back, so
consumers see the same sequence as any other load. `file-loaded` waits for the
reply so plugins can read their media snapshot during the event.

Fixes #320
This commit is contained in:
sudacode authored and GitHub committed 2026-11-03 21:40:14 -08:00
1 parent 8e29cb3c55
commit 1c50d249e0
4 files changed
+167 -11

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
type: fixed
area: playback
- Reloading the same file in mpv (`loadfile <current path> replace`) could intermittently leave playback paused forever. SubMiner now treats that reload like any other newly loaded file, so it resets the subtitle state and resumes once the file is ready.