Commit 575d3a59 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Add delete endpoints (library/playlists/tracks) + rate limit Discovery's identify endpoint

DELETE /library/{id} - removes a song, its file on disk, and any
PlaylistTrack rows pointing at it (owner-scoped).
DELETE /playlists/{id} - removes a playlist and its tracks (owner-scoped).
DELETE /playlists/{id}/tracks/{song_id} - removes one track from a
playlist without deleting the song itself (owner-scoped).

Also adds rate limiting to POST /discovery/listen (20 identify calls per
user per 10 minutes, new DiscoveryAttempt table + migration 9f6585c71f80)
- each call is a real, billable Shazam + AcoustID request and was
previously uncapped. Counts every attempt, not just successful ones (a
failed identification still costs the same external API call, and only
successful ones create a DiscoveredSong row).
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 28e9ac64
Pipeline #1099 passed with stage
in 8 minutes and 21 seconds