- feat: the scan summary has an unsupported counter for audio files in formats
Sonda cannot read yet (m4a, ogg, opus, wav, wma, ...); they are counted and
never opened, instead of disappearing without a trace. Video containers such
as .mpg are not counted
- feat: folders named .@__thumb, @Recycle, #recycle, @eaDir, $RECYCLE.BIN and
System Volume Information are skipped, matched by exact name ignoring case,
so a NAS recycle bin does not end up in the library; a library whose own
folder carries one of these names is still scanned, and files indexed before
from such a folder are flagged missing like any vanished file
- docs: the README lists the new counter and the skipped folders
- test: system folders at any depth, near-miss names, a library inside a
system-named folder, entries flagged missing, unsupported counting
Closes#14
- fix(migration): roots that differ only in case (/Music and /music are two
directories on Linux) used to make migration 0005 fail on the unique name;
the later ones now get a numeric suffix
- feat(library): at startup, log a warning for every library whose directory
cannot be read or that overlaps another, because migrated rows skip
validation and may still hold roots that were removed from the old config
- fix(library): creating or updating a library is now serialised, so two
concurrent requests cannot both pass the overlap check
- fix(library): changing a library's directory or deleting it is refused with
409 scan_running while a scan runs; the scan works from the list it started
with and would write under a stale path
- fix(library): library names clash ignoring case and accents the same way on
SQLite and PostgreSQL, checked in Go
- fix(library): changing only the path no longer revalidates an untouched
name, which can be longer than the limit after a migration
- test: roots differing in case on both databases; concurrent creates with a
slow store, verified to fail without the lock; the busy guard; Problems
- 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
- fix(storage): RefreshMatchKeys recomputes name_key and title_key for rows
created before migration 0003, whose SQL lower() key is ASCII-only on SQLite;
idempotent, runs at every start
- fix(library): re-check that the stat result is a regular file, closing the
window where a path is swapped for a FIFO or symlink after the directory read
- docs(library): note that OnFinish callbacks of consecutive scans can overlap
- test: old rows with approximate keys are matched after the refresh
- fix: skip FIFOs, sockets and devices named like audio files; opening a named
pipe blocked a scan forever and left the manager stuck in "running"
- fix: a file that cannot be stat'ed for a transient reason is unknown, not
gone, so it is never marked missing or used as a rename source
- fix: log the scan result from Manager.OnFinish instead of the lossy event
hub, so the line can no longer be dropped
- fix(storage): match artists and albums on a Unicode-aware key computed in Go
(migration 0003, both drivers), so SQLite and PostgreSQL agree
- test: FIFO, stat errors, OnFinish, Unicode artist and album matching
- fix: follow a root that is itself a symlink (e.g. /srv/music -> /mnt/nas/music).
Before, the walk saw a non-directory, found nothing and flagged every indexed
file as missing. Symlinks inside a root are still skipped
- fix: when a root is empty but files are indexed (typical for an unmounted
NAS mount point), return an error instead of flagging the whole library
- test: symlinked root, symlink to a file, empty root with and without indexed
files
- feat(library): walk each root, plan the changes, read tags with N parallel
workers and write from a single goroutine
- feat(library): detect renames by size and mtime only when the match is
unambiguous; mark vanished files missing instead of deleting them
- fix-safe: an unreadable root, an unreadable subdirectory or an interrupted
scan never marks files as missing; symlinks are skipped
- feat(library): event hub that fans scan progress out to subscribers without
ever blocking the scan (ready for a websocket client)
- feat(library): TagLib (WASM, no CGO) reader for MP3 and FLAC tags and
audio properties, with title and artist fallbacks
- feat(storage): library repository for SQLite and PostgreSQL
- feat(api): POST/GET /api/v1/library/scan to start a scan and read its status
- feat(config): library.scan_workers