mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 12:55:16 -07:00
feat: add mark-watched action, background app reuse, and N+1 compat
- Add `--mark-watched` CLI flag + mpv session binding; marks video watched, shows OSD, advances playlist - Launcher detects running background app via `--app-ping` and borrows it instead of owning its lifecycle - Preserve N+1 highlighting for existing configs with `knownWords.highlightEnabled` set - Fix `resolveConfiguredShortcuts` to respect explicit `null` overrides (disabling defaults) - Split session-help modal into focused modules (colors, render, sections, tabs)
This commit is contained in:
@@ -67,6 +67,40 @@ test('normalizeStartupArgv uses transported AppImage args instead of raw Electro
|
||||
);
|
||||
});
|
||||
|
||||
test('normalizeStartupArgv defaults empty transported AppImage args to background startup', () => {
|
||||
const originalPlatform = process.platform;
|
||||
try {
|
||||
Object.defineProperty(process, 'platform', { value: 'linux', configurable: true });
|
||||
|
||||
assert.deepEqual(
|
||||
normalizeStartupArgv(['SubMiner.AppImage', '--background'], {
|
||||
SUBMINER_APP_ARGC: '0',
|
||||
}),
|
||||
['SubMiner.AppImage', '--start', '--background'],
|
||||
);
|
||||
} finally {
|
||||
Object.defineProperty(process, 'platform', { value: originalPlatform, configurable: true });
|
||||
}
|
||||
});
|
||||
|
||||
test('normalizeStartupArgv defaults passive-only transported AppImage args to background startup', () => {
|
||||
const originalPlatform = process.platform;
|
||||
try {
|
||||
Object.defineProperty(process, 'platform', { value: 'linux', configurable: true });
|
||||
|
||||
assert.deepEqual(
|
||||
normalizeStartupArgv(['SubMiner.AppImage'], {
|
||||
SUBMINER_APP_ARGC: '2',
|
||||
SUBMINER_APP_ARG_0: '--password-store',
|
||||
SUBMINER_APP_ARG_1: 'gnome-libsecret',
|
||||
}),
|
||||
['SubMiner.AppImage', '--password-store', 'gnome-libsecret', '--start', '--background'],
|
||||
);
|
||||
} finally {
|
||||
Object.defineProperty(process, 'platform', { value: originalPlatform, configurable: true });
|
||||
}
|
||||
});
|
||||
|
||||
test('hasTransportedStartupArgs detects env-carried app args', () => {
|
||||
assert.equal(hasTransportedStartupArgs({ SUBMINER_APP_ARGC: '1' }), true);
|
||||
assert.equal(hasTransportedStartupArgs({}), false);
|
||||
|
||||
Reference in New Issue
Block a user