mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-28 16:49:50 -07:00
feat(launcher): add -H/--history command to browse local watch history
- New `subminer -H` flag opens an fzf/rofi menu of watched series from the immersion tracker DB - Actions: replay last episode, play next episode (cross-season), or browse episodes - Adds `history.ts` with DB query, series grouping, season dir listing, and next-episode logic - Adds `bun-sqlite.d.ts` ambient types for tsc compat - Includes full test coverage in `history.test.ts`
This commit is contained in:
@@ -21,6 +21,7 @@ import { runDictionaryCommand } from './commands/dictionary-command.js';
|
||||
import { runLogsCommand } from './commands/logs-command.js';
|
||||
import { runStatsCommand } from './commands/stats-command.js';
|
||||
import { runJellyfinCommand } from './commands/jellyfin-command.js';
|
||||
import { runHistoryCommand } from './commands/history-command.js';
|
||||
import { runPlaybackCommand } from './commands/playback-command.js';
|
||||
import { runUpdateCommand } from './commands/update-command.js';
|
||||
|
||||
@@ -142,6 +143,16 @@ async function main(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (appContext.args.history) {
|
||||
const selected = await runHistoryCommand(appContext);
|
||||
if (!selected) {
|
||||
log('info', args.logLevel, 'No watch history selection made, exiting');
|
||||
return;
|
||||
}
|
||||
appContext.args.target = selected;
|
||||
appContext.args.targetKind = 'file';
|
||||
}
|
||||
|
||||
await runPlaybackCommand(appContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user