diff --git a/package.json b/package.json index f89814b..c09a96b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "netfelix-audio-fix", - "version": "2026.04.15.8", + "version": "2026.04.15.9", "scripts": { "dev:server": "NODE_ENV=development bun --hot server/index.tsx", "dev:client": "vite", diff --git a/server/api/scan.ts b/server/api/scan.ts index 65fa562..c58f152 100644 --- a/server/api/scan.ts +++ b/server/api/scan.ts @@ -163,7 +163,11 @@ app.get("/items", (c) => { ` SELECT id, jellyfin_id, name, type, series_name, season_number, episode_number, scan_status, original_language, orig_lang_source, container, file_size, file_path, - last_scanned_at, ingest_source + last_scanned_at, ingest_source, + (SELECT GROUP_CONCAT(DISTINCT LOWER(codec)) + FROM media_streams + WHERE item_id = media_items.id AND type = 'Audio' AND codec IS NOT NULL + ) AS audio_codecs FROM media_items ${where.sql} ORDER BY COALESCE(last_scanned_at, created_at) DESC, id DESC @@ -186,6 +190,7 @@ app.get("/items", (c) => { file_path: string; last_scanned_at: string | null; ingest_source: string | null; + audio_codecs: string | null; }>; const total = (db.prepare(`SELECT COUNT(*) as n FROM media_items ${where.sql}`).get(...where.args) as { n: number }).n; return c.json({ rows, total, hasMore: query.offset + rows.length < total, query }); diff --git a/src/features/scan/ScanPage.tsx b/src/features/scan/ScanPage.tsx index 2045a17..2372f40 100644 --- a/src/features/scan/ScanPage.tsx +++ b/src/features/scan/ScanPage.tsx @@ -37,6 +37,7 @@ interface ScanItemsRow { file_path: string; last_scanned_at: string | null; ingest_source: "scan" | "webhook" | null; + audio_codecs: string | null; } interface ScanItemsResponse { @@ -397,7 +398,7 @@ export function ScanPage() { return (
-

Scan

+

Library

@@ -581,22 +582,32 @@ export function ScanPage() { - {["Scanned", "Name", "Type", "Series / Ep", "Language", "Container", "Size", "Source", "Status", "Path"].map( - (h) => ( - - ), - )} + {[ + "Scanned", + "Name", + "Type", + "Series / Ep", + "Language", + "Audio", + "Container", + "Size", + "Source", + "Status", + "Path", + ].map((h) => ( + + ))} {itemsRows.length === 0 && !itemsLoading && ( - @@ -616,6 +627,9 @@ export function ScanPage() {
{row.original_language ?? "—"}
{row.orig_lang_source ?? "—"}
+
- {h} - + {h} +
+ No items match the current filters.
+ {row.audio_codecs ? row.audio_codecs.split(",").join(" · ") : "—"} + {row.container ?? "—"} {formatFileSize(row.file_size)} diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index d9b33a6..eed75e3 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -65,7 +65,7 @@ function RootLayout() {
- Scan + Library Pipeline Subtitles