fix: delay youtube overlay bootstrap until yomitan loads

This commit is contained in:
2026-03-25 20:36:50 -07:00
parent 55300e2d8c
commit 9dca83acd9
16 changed files with 143 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {
commandNeedsOverlayRuntime,
hasExplicitCommand,
isHeadlessInitialCommand,
parseArgs,
@@ -70,6 +71,12 @@ test('parseArgs captures youtube startup forwarding flags', () => {
assert.equal(shouldStartApp(args), true);
});
test('youtube playback does not use generic overlay-runtime bootstrap classification', () => {
const args = parseArgs(['--youtube-play', 'https://youtube.com/watch?v=abc']);
assert.equal(commandNeedsOverlayRuntime(args), false);
});
test('parseArgs handles jellyfin item listing controls', () => {
const args = parseArgs([
'--jellyfin-items',

View File

@@ -499,7 +499,10 @@ export function commandNeedsOverlayRuntime(args: CliArgs): boolean {
args.triggerFieldGrouping ||
args.triggerSubsync ||
args.markAudioCard ||
args.openRuntimeOptions ||
Boolean(args.youtubePlay)
args.openRuntimeOptions
);
}
export function commandNeedsOverlayStartupPrereqs(args: CliArgs): boolean {
return commandNeedsOverlayRuntime(args) || Boolean(args.youtubePlay);
}