Fix sidebar, add library editing, improve file browser

- Sidebar: show Podcasts section only when podcast libraries exist;
  show hint text when no libraries are configured yet
- Admin: extract LibraryForm component, add edit (Pencil) button per
  library with inline form and PATCH support
- Backend: add media_type to LibraryUpdate schema and PATCH handler
- FileBrowser: add quick-access shortcuts (/audiofiles /data /media /),
  show all files+dirs so users can confirm correct folder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Audiolib
2026-05-26 14:42:35 +02:00
parent 1772c97dc8
commit 18d1481681
6 changed files with 172 additions and 97 deletions

View File

@@ -172,6 +172,8 @@ async def update_library(
{"id": f.get("id", str(uuid.uuid4())), "fullPath": f.get("fullPath", f.get("full_path", ""))}
for f in body.folders
]
if body.media_type is not None:
lib.media_type = body.media_type
if body.settings is not None:
lib.settings = {**(lib.settings or {}), **body.settings}

View File

@@ -55,6 +55,7 @@ class LibraryCreate(BaseModel):
class LibraryUpdate(BaseModel):
name: str | None = None
folders: list[dict] | None = None
media_type: str | None = None
settings: dict | None = None