From 514b72cddb79a64c8324c226972b4afe6cc0ac4a Mon Sep 17 00:00:00 2001 From: RXWatcher <14085001+RXWatcher@users.noreply.github.com> Date: Sun, 24 May 2026 16:12:49 +0200 Subject: [PATCH] feat(audiobooks): expose audiobooks/podcasts library types in admin UI Adds 'Audiobooks' and 'Podcasts' options to the library-type dropdown in the admin libraries page so operators can flag a folder as an audiobook or podcast library. Extends contentLevelsForType() so the admin UI's downstream filtering treats those types correctly (audiobook -> ['audiobook'], podcasts -> ['podcast', 'podcast_episode']). Backend scanner branches for these types were already wired in sub-plan 2. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/components/admin/libraries/LibraryForm.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web/src/components/admin/libraries/LibraryForm.tsx b/web/src/components/admin/libraries/LibraryForm.tsx index 94d58e13..cf946bf4 100644 --- a/web/src/components/admin/libraries/LibraryForm.tsx +++ b/web/src/components/admin/libraries/LibraryForm.tsx @@ -67,6 +67,10 @@ function contentLevelsForType(libraryType: string): string[] { return ["movie"]; case "mixed": return ["movie", "series", "season", "episode"]; + case "audiobooks": + return ["audiobook"]; + case "podcasts": + return ["podcast", "podcast_episode"]; default: return []; } @@ -131,7 +135,10 @@ function buildLevelChainsFromServer( } function contentLevelLabel(level: string): string { - return level.charAt(0).toUpperCase() + level.slice(1); + return level + .split("_") + .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) + .join(" "); } function buildProviderChainBody(activeLevelChains: Record) { @@ -466,6 +473,8 @@ export function LibraryForm({ Movies Series Mixed + Audiobooks + Podcasts