remove standalone subtitle extract, unify done semantics, fix nav active matching
All checks were successful
Build and Push Docker Image / build (push) Successful in 49s
All checks were successful
Build and Push Docker Image / build (push) Successful in 49s
Subtitle extraction lives only in the pipeline now; a file is 'done' when it
matches the desired end state — no embedded subs AND audio matches the
language config. The separate Extract page was redundant.
- delete src/routes/review/subtitles/extract.tsx + SubtitleExtractPage
- delete /api/subtitles/extract-all + /:id/extract endpoints
- delete buildExtractOnlyCommand + unused buildExtractionOutputs from ffmpeg.ts
- detail page: drop Extract button + extractCommand textarea, replace with
'will be extracted via pipeline' note when embedded subs present
- pipeline endpoint: doneCount = is_noop OR status='done' (a file in the
desired state, however it got there); UI label 'N files in desired state'
- nav: drop the now-defunct 'Extract subs' link, default activeOptions.exact
to false so detail subpages (e.g. /review/audio/123) highlight their
parent ('Audio') in the menu — was the cause of the broken-feeling menu
This commit is contained in:
@@ -281,7 +281,17 @@ app.get("/pipeline", (c) => {
|
||||
`)
|
||||
.all();
|
||||
|
||||
const noops = db.prepare("SELECT COUNT(*) as count FROM review_plans WHERE is_noop = 1").get() as { count: number };
|
||||
// "Done" = files that are already in the desired end state. Two ways
|
||||
// to get there: (a) the analyzer says nothing to do (is_noop=1), or
|
||||
// (b) we ran a job that finished. Both count toward the same total.
|
||||
const doneCount = (
|
||||
db
|
||||
.prepare(`
|
||||
SELECT COUNT(*) as count FROM review_plans
|
||||
WHERE is_noop = 1 OR status = 'done'
|
||||
`)
|
||||
.get() as { count: number }
|
||||
).count;
|
||||
|
||||
// Batch transcode reasons for all review plans in one query (avoids N+1)
|
||||
const planIds = (review as { id: number }[]).map((r) => r.id);
|
||||
@@ -305,7 +315,7 @@ app.get("/pipeline", (c) => {
|
||||
item.transcode_reasons = reasonsByPlan.get(item.id) ?? [];
|
||||
}
|
||||
|
||||
return c.json({ review, queued, processing, done, noopCount: noops.count, jellyfinUrl });
|
||||
return c.json({ review, queued, processing, done, doneCount, jellyfinUrl });
|
||||
});
|
||||
|
||||
// ─── List ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user