feat(tracks): filter track list by ingest source
Docker Build & Publish / build (push) Has been cancelled
Docker Build & Publish / push (push) Has been cancelled
Docker Build & Publish / Prune old image versions (push) Has been cancelled

Add an optional `source` filter to `GET /api/v1/tracks` (and the
`TrackRepository.list`/`count` port + SQLAlchemy adapter). Lets clients
query, e.g., only uploaded tracks (`?source=upload`) newest-first — the
backing for the webui's persistent "Recently uploaded" view.

- test: upload then list with `?source=upload` (hit) / `?source=youtube`
  (miss)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Senko-san
2026-06-14 01:35:51 +03:00
parent fa23568214
commit ea880edd57
4 changed files with 35 additions and 1 deletions
+2
View File
@@ -145,6 +145,7 @@ class TrackRepository(Protocol):
artist_id: uuid.UUID | None,
album_id: uuid.UUID | None,
q: str | None,
source: str | None = None,
sort_by: str,
order: str,
limit: int,
@@ -156,6 +157,7 @@ class TrackRepository(Protocol):
artist_id: uuid.UUID | None,
album_id: uuid.UUID | None,
q: str | None,
source: str | None = None,
) -> int: ...
async def update(
self,