wire scheduler into queue, add retry, dev-reset cleanup, biome 2.4 migrate

- execute: actually call isInScheduleWindow/waitForWindow/sleepBetweenJobs in runSequential (they were dead code); emit queue_status SSE events (running/paused/sleeping/idle) so the pipeline's existing QueueStatus listener lights up
- review: POST /:id/retry resets an errored plan to approved, wipes old done/error jobs, rebuilds command from current decisions, queues fresh job
- scan: dev-mode DELETE now also wipes jobs + subtitle_files (previously orphaned after every dev reset)
- biome: migrate config to 2.4 schema, autoformat 68 files (strings + indentation), relax opinionated a11y/hooks-deps/index-key rules that don't fit this codebase
- routeTree.gen.ts regenerated after /nodes removal
This commit is contained in:
2026-04-13 07:41:19 +02:00
parent f11861658e
commit 874f04b7a5
69 changed files with 3511 additions and 2232 deletions

View File

@@ -3,7 +3,7 @@
export interface MediaItem {
id: number;
jellyfin_id: string;
type: 'Movie' | 'Episode';
type: "Movie" | "Episode";
name: string;
series_name: string | null;
series_jellyfin_id: string | null;
@@ -14,12 +14,12 @@ export interface MediaItem {
file_size: number | null;
container: string | null;
original_language: string | null;
orig_lang_source: 'jellyfin' | 'radarr' | 'sonarr' | 'manual' | null;
orig_lang_source: "jellyfin" | "radarr" | "sonarr" | "manual" | null;
needs_review: number;
imdb_id: string | null;
tmdb_id: string | null;
tvdb_id: string | null;
scan_status: 'pending' | 'scanned' | 'error';
scan_status: "pending" | "scanned" | "error";
scan_error: string | null;
last_scanned_at: string | null;
created_at: string;
@@ -29,7 +29,7 @@ export interface MediaStream {
id: number;
item_id: number;
stream_index: number;
type: 'Video' | 'Audio' | 'Subtitle' | 'Data' | 'EmbeddedImage';
type: "Video" | "Audio" | "Subtitle" | "Data" | "EmbeddedImage";
codec: string | null;
language: string | null;
language_display: string | null;
@@ -46,11 +46,11 @@ export interface MediaStream {
export interface ReviewPlan {
id: number;
item_id: number;
status: 'pending' | 'approved' | 'skipped' | 'done' | 'error';
status: "pending" | "approved" | "skipped" | "done" | "error";
is_noop: number;
confidence: 'high' | 'low';
apple_compat: 'direct_play' | 'remux' | 'audio_transcode' | null;
job_type: 'copy' | 'transcode';
confidence: "high" | "low";
apple_compat: "direct_play" | "remux" | "audio_transcode" | null;
job_type: "copy" | "transcode";
subs_extracted: number;
notes: string | null;
reviewed_at: string | null;
@@ -73,7 +73,7 @@ export interface StreamDecision {
id: number;
plan_id: number;
stream_id: number;
action: 'keep' | 'remove';
action: "keep" | "remove";
target_index: number | null;
custom_title: string | null;
transcode_codec: string | null;
@@ -83,8 +83,8 @@ export interface Job {
id: number;
item_id: number;
command: string;
job_type: 'copy' | 'transcode';
status: 'pending' | 'running' | 'done' | 'error';
job_type: "copy" | "transcode";
status: "pending" | "running" | "done" | "error";
output: string | null;
exit_code: number | null;
created_at: string;
@@ -95,17 +95,22 @@ export interface Job {
// ─── Analyzer types ───────────────────────────────────────────────────────────
export interface StreamWithDecision extends MediaStream {
action: 'keep' | 'remove';
action: "keep" | "remove";
target_index: number | null;
}
export interface PlanResult {
is_noop: boolean;
has_subs: boolean;
confidence: 'high' | 'low';
apple_compat: 'direct_play' | 'remux' | 'audio_transcode' | null;
job_type: 'copy' | 'transcode';
decisions: Array<{ stream_id: number; action: 'keep' | 'remove'; target_index: number | null; transcode_codec: string | null }>;
confidence: "high" | "low";
apple_compat: "direct_play" | "remux" | "audio_transcode" | null;
job_type: "copy" | "transcode";
decisions: Array<{
stream_id: number;
action: "keep" | "remove";
target_index: number | null;
transcode_codec: string | null;
}>;
notes: string[];
}
@@ -161,7 +166,7 @@ export interface ScanProgress {
// ─── SSE event helpers ────────────────────────────────────────────────────────
export type SseEventType = 'progress' | 'log' | 'complete' | 'error';
export type SseEventType = "progress" | "log" | "complete" | "error";
export interface SseEvent {
type: SseEventType;