feat(anime): append queued episodes to mpv playlist

- Resolve queued streams immediately and cache subtitles in the background
- Attach prepared tracks as mpv advances through the playlist
This commit is contained in:
2026-08-14 23:45:45 -07:00
parent 183560d2c3
commit 935e4c145f
21 changed files with 660 additions and 289 deletions
@@ -43,6 +43,21 @@ test('the store stops answering once the player moves on', () => {
assert.equal(store.match(metadata().mediaPath), null);
});
test('the store keeps metadata for more than one resolved playlist entry', () => {
const store = createStreamPlaybackMetadataStore();
const first = metadata();
const second = metadata({
mediaPath: 'http://127.0.0.1:41234/video/def.m3u8',
statsPath: 'animebrowser://9001/%2Fanime%2Fmushoku/%2Fwatch%2Fep-5',
episodeNumber: 5,
});
store.set(first);
store.set(second);
assert.equal(store.match(first.mediaPath), first);
assert.equal(store.match(second.mediaPath), second);
});
test('an explicit target path does not inherit the current stream metadata', () => {
const store = createStreamPlaybackMetadataStore();
const current = metadata();