Add ability to watch a single song #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
Currently users can "Watch All" for an artist (watches all tracks across all release groups) or watch at the album level via the web UI. There's no way to watch a single specific song — for example, adding just one track from an album to the download queue without watching the entire album.
What to change
Frontend —
shanty-web/frontend/src/pages/album.rs: Add a "Watch" button to each track row in the album detail table. Currently the table has columns: #, Title, Duration, Status, Lyrics. Add a small button (or icon) in each row that watches just that track.Frontend API —
shanty-web/frontend/src/api.rs: Add a function likewatch_track(artist: &str, title: &str, mbid: Option<&str>)that calls the backend to add a single wanted item.Backend —
shanty-web/src/routes/artists.rsor a new route: Add an endpoint likePOST /api/tracks/watchwith body{"artist": "...", "title": "...", "recording_mbid": "..."}. This should callshanty_watch::add_track()which already exists inshanty-watch/src/library.rsand creates a single wanted item.The existing
shanty_watch::add_track()function (shanty-watch/src/library.rs:200-243) already handles single-track watching — it creates a wanted item withItemType::Track, checks ownership, and upserts the artist. The backend just needs to expose this via an API endpoint and the frontend needs a button to call it.Album page context: The album detail page (
shanty-web/frontend/src/pages/album.rs) shows tracks from MusicBrainz data (MbAlbumTracktype) which hasrecording_mbid,title,track_number, etc. The watch button should pass the recording MBID and title to the backend so the wanted item has proper metadata for the sync → download pipeline to find the right track.Acceptance criteria: