fix: scan visibility, NC folder validation, watcher logging
- nc-scan: detailed INFO logging of every path found, subfolder contents and skip reasons; 502 now includes the exact folder and error so user sees a real message instead of a blank result - band creation: if nc_base_path is explicitly given, verify the folder exists in Nextcloud before saving — returns 422 with a clear message to the user; auto-generated paths still do MKCOL - songs search: add ?unattributed=true to return songs with no session_id (files not in a YYMMDD folder) - BandPage: show "Unattributed Recordings" section below sessions so scanned files without a dated folder always appear - watcher event_loop: promote all per-activity log lines from DEBUG to INFO so they're visible in default Docker Compose log output; log normalized path and skip reason for every activity Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,7 @@ class SongRepository(BaseRepository[Song]):
|
||||
bpm_min: float | None = None,
|
||||
bpm_max: float | None = None,
|
||||
session_id: uuid.UUID | None = None,
|
||||
unattributed: bool = False,
|
||||
) -> list[Song]:
|
||||
from sqlalchemy import cast, func
|
||||
from sqlalchemy.dialects.postgresql import ARRAY
|
||||
@@ -75,6 +76,8 @@ class SongRepository(BaseRepository[Song]):
|
||||
stmt = stmt.where(Song.global_bpm <= bpm_max)
|
||||
if session_id is not None:
|
||||
stmt = stmt.where(Song.session_id == session_id)
|
||||
if unattributed:
|
||||
stmt = stmt.where(Song.session_id.is_(None))
|
||||
|
||||
result = await self.session.execute(stmt)
|
||||
return list(result.scalars().all())
|
||||
|
||||
Reference in New Issue
Block a user