mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-09 16:19:25 -07:00
fix: delay youtube overlay bootstrap until yomitan loads
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user