mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-25 00:11:26 -07:00
feat: auto-load youtube subtitles before manual picker
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
|
||||
import { parseArgs } from '../cli/args';
|
||||
import {
|
||||
applyStartupState,
|
||||
createAppState,
|
||||
createInitialAnilistMediaGuessRuntimeState,
|
||||
createInitialAnilistUpdateInFlightState,
|
||||
transitionAnilistClientSecretState,
|
||||
@@ -91,3 +94,22 @@ test('transitionAnilistUpdateInFlightState updates inFlight only', () => {
|
||||
assert.deepEqual(transitioned, { inFlight: true });
|
||||
assert.notEqual(transitioned, current);
|
||||
});
|
||||
|
||||
test('applyStartupState does not mark youtube playback flow pending from startup args alone', () => {
|
||||
const appState = createAppState({
|
||||
mpvSocketPath: '/tmp/mpv.sock',
|
||||
texthookerPort: 4000,
|
||||
});
|
||||
|
||||
applyStartupState(appState, {
|
||||
initialArgs: parseArgs(['--youtube-play', 'https://www.youtube.com/watch?v=video123']),
|
||||
mpvSocketPath: '/tmp/mpv.sock',
|
||||
texthookerPort: 4000,
|
||||
backendOverride: null,
|
||||
autoStartOverlay: false,
|
||||
texthookerOnlyMode: false,
|
||||
backgroundMode: false,
|
||||
});
|
||||
|
||||
assert.equal(appState.youtubePlaybackFlowPending, false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user