sonda/internal/api/http
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tgiachi 46463846b3 feat(library): named media libraries managed through the API
- feat(storage): libraries table (name, path); audio_files points at a library
  by id instead of repeating the root path; migration 0005 for both drivers
  turns every existing root into a library and keeps file ids, tracks and the
  missing flag
- feat(library): Libraries service validates names and paths: absolute, an
  existing directory, never the filesystem root, never inside or around
  another library (checked on real paths, so symlinks cannot hide an overlap)
- feat(api): admin-only GET/POST /libraries, PATCH/DELETE /libraries/{id} and
  POST /libraries/{id}/scan; deleting a library drops its index entries and
  keeps tracks and listening history
- feat(library): the scanner and the scan manager work on libraries; scanning
  with no libraries answers 409 no_libraries
- feat(streaming): the library directory comes from the database instead of
  a configured list of roots
- breaking(config): library.roots is removed; an old config fails with a hint
  to use POST /api/v1/libraries
- test: CRUD and duplicates on both databases, path change keeps files,
  upgrade of a database written before libraries existed
2026-11-11 13:30:25 +01:00
..
api_test.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
auth_test.go fix(streaming): open files through os.Root and tighten token parsing 2026-11-11 13:00:17 +01:00
errors.go feat: add sondad server with config, storage, auth and listening API 2026-11-11 12:06:15 +01:00
handlers_auth.go feat(auth): add refresh tokens, admin role and user management 2026-11-11 12:38:42 +01:00
handlers_libraries.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
handlers_library.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
handlers_listen.go feat: add sondad server with config, storage, auth and listening API 2026-11-11 12:06:15 +01:00
handlers_stream.go feat(streaming): stream tracks with HTTP Range support 2026-11-11 12:56:20 +01:00
handlers_users.go feat(auth): add refresh tokens, admin role and user management 2026-11-11 12:38:42 +01:00
libraries_test.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
library_test.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
middleware.go fix(streaming): open files through os.Root and tighten token parsing 2026-11-11 13:00:17 +01:00
router.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
stream_test.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00