Enhance AniList character dictionary sync and subtitle features (#15)

This commit is contained in:
sudacode authored and GitHub committed 2026-03-07 18:30:59 -08:00
1 parent 2f07c3407a
commit e18985fb14
696 files changed
+14297 -173564

No files matched your search

+43
View File
@@ -453,3 +453,46 @@ test('MpvIpcClient updates current audio stream index from track list', async ()
assert.equal(client.currentAudioStreamIndex, 11);
});
test('MpvIpcClient playNextSubtitle preserves a manual paused state', async () => {
const commands: unknown[] = [];
const client = new MpvIpcClient('/tmp/mpv.sock', makeDeps());
(client as any).send = (payload: unknown) => {
commands.push(payload);
return true;
};
(client as any).pendingPauseAtSubEnd = true;
(client as any).pauseAtTime = 42;
await invokeHandleMessage(client, {
event: 'property-change',
name: 'pause',
data: true,
});
client.playNextSubtitle();
assert.equal((client as any).pendingPauseAtSubEnd, false);
assert.equal((client as any).pauseAtTime, null);
assert.deepEqual(commands, [{ command: ['sub-seek', 1] }]);
});
test('MpvIpcClient playNextSubtitle still auto-pauses at end while already playing', async () => {
const commands: unknown[] = [];
const client = new MpvIpcClient('/tmp/mpv.sock', makeDeps());
(client as any).send = (payload: unknown) => {
commands.push(payload);
return true;
};
await invokeHandleMessage(client, {
event: 'property-change',
name: 'pause',
data: false,
});
client.playNextSubtitle();
assert.equal((client as any).pendingPauseAtSubEnd, true);
assert.deepEqual(commands, [{ command: ['sub-seek', 1] }]);
});