mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 00:55:16 -07:00
fix: drop stale deferred autoplay-ready signals on media change
- autoplay-ready gate now stamps pending signal with mediaPath and discards it on flush if media has changed - tokenization warm release skips signaling when current media path is cleared (null) - tighten regex matchers in main-wiring and overlay-legacy-cleanup tests
This commit is contained in:
@@ -67,3 +67,20 @@ test('autoplay tokenization warm release skips stale media after warmup resolves
|
||||
|
||||
assert.deepEqual(calls, ['warmup']);
|
||||
});
|
||||
|
||||
test('autoplay tokenization warm release skips signaling when current media is cleared', () => {
|
||||
const calls: string[] = [];
|
||||
const release = createAutoplayTokenizationWarmRelease({
|
||||
isTokenizationWarmupReady: () => true,
|
||||
startTokenizationWarmups: async () => {
|
||||
calls.push('warmup');
|
||||
},
|
||||
getCurrentMediaPath: () => null,
|
||||
signalAutoplayReady: () => calls.push('signal'),
|
||||
warn: () => {},
|
||||
});
|
||||
|
||||
release('/tmp/video.mkv');
|
||||
|
||||
assert.deepEqual(calls, []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user