Skip to content

scrobble() hardcodes an empty artist — every scrobble is submitted with a blank artist field #422

Description

@forkwright

Finding

scrobble() constructs ScrobbleParams with artist: String::new(). The Last.fm track.scrobble method requires a non-empty artist; a blank value is rejected with error 6 ("Invalid parameters") or filed under an empty artist name. The function receives track_id and user_id but never resolves the track's artist — the empty string is an unfinished placeholder.

Evidence

crates/syndesmos/src/lastfm/scrobble.rs:22: artist: String::new(), — the field is unconditionally empty; track is set from track_id.to_string() but artist is never populated. The accompanying test asserts only submitted[0].track == track_id.to_string() and never checks the artist, so it passes regardless.

Why this matters

Every scrobble carries no artist, so Last.fm either rejects it or records a blank-artist entry, corrupting listening history. Combined with the missing response-status check, the rejection is invisible to the caller.

Desired correction

Resolve the track's artist (and title/album) from the store before building ScrobbleParams. scrobble() should take pre-resolved metadata or a store reference rather than only a raw MediaId.
Done when: a test verifying that scrobble() submits the correct artist name for a known track passes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions