fix(playback): wait for mpv's reply to every reused-instance IPC command (#1876)

Every reused-instance MPV IPC command now carries a request_id and waits, within the existing 2 s bound, for mpv's matching reply; an error or missing reply falls back to a fresh launch like a socket failure, and the racing post-loadfile seek is gone. MPV launches run one at a time through a launch queue so overlapping launches never act on the same child; Stop on a queued launch delegates to the in-flight launch's own closer, a failed exit stays retryable, and the dock keeps the newest launch. Position polling and output-error reporting moved out of mpv-session.service.ts, which leaves the max-lines baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 authored and GitHub committed 2026-10-11 22:42:43 +02:00
1 parent 94570bc387
commit 4e9795ac54
21 files changed
+2920 -394

No files matched your search

@@ -92,6 +92,11 @@ export interface ExternalPlayerSession {
contentInfo?: PlayerContentInfo;
startedAt: string;
updatedAt: string;
/**
* Order in which sessions began in this app run. Unlike `startedAt` it
* tells apart launches made in the same millisecond.
*/
launchOrder?: number;
/** Raw failure detail; the dock translates `errorCode` instead. */
error?: string;
errorCode?: ExternalPlayerErrorCode;