feat(playlists): Service with CRUD methods (M7 #352 slice 1)

Create / Get / List / Update / Delete with the visibility model from
the spec: private by default, owner-only mutations, public read for
non-owners. Update uses sqlc's CASE-WHEN-flag pattern for PATCH-style
partial updates without writing N variants.

Delete cleans up the cached cover file from disk best-effort. Track
operations (Append/Remove/Reorder) and the collage generator land
in subsequent tasks.

Also adds playlists + playlist_tracks to dbtest.ResetDB's truncate
list so integration tests in this package start from a clean state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 10:17:08 -04:00
parent 1226cb7583
commit 5c61c10b63
4 changed files with 748 additions and 0 deletions
+2
View File
@@ -52,6 +52,8 @@ var dataTables = []string{
"sessions",
"lidarr_quarantine_actions",
"lidarr_quarantine",
"playlist_tracks",
"playlists",
"tracks",
"albums",
"artists",