mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-23 04:46:08 -08:00
fix(jellyfin): keep playback armed across file unload and serialize episode stops
- An empty mpv path during the startup grace belongs to the file being replaced, so it no longer clears the new, not-yet-loaded playback. This dropped Jellyfin reporting (and the episode queue) whenever playback started while another file was playing, and failed E2E on all CI runners. - Chain superseded stop reports so each episode start waits for every earlier stop, and skip starts a later switch already took over. - Tag tracked reports with their playback so a superseded stop drains only its own in-flight progress, not the new episode's. - E2E: clamp the fake server's range end and wait for the ep2 start report.
This commit is contained in:
7 files changed
+153
-63
No files matched your search
@@ -32,7 +32,7 @@ function serveFile(request: http.IncomingMessage, response: http.ServerResponse,
|
||||
const size = fs.statSync(file).size;
|
||||
const range = /^bytes=(\d+)-(\d*)$/.exec(request.headers.range ?? '');
|
||||
const start = range ? Number(range[1]) : 0;
|
||||
const end = range?.[2] ? Number(range[2]) : size - 1;
|
||||
const end = Math.min(range?.[2] ? Number(range[2]) : size - 1, size - 1);
|
||||
response.writeHead(range ? 206 : 200, {
|
||||
'content-type': 'video/x-matroska',
|
||||
'accept-ranges': 'bytes',
|
||||
|
||||
Reference in new issue
Block a user