Stop scoping the stale-wanted-row cleanup delete by album #54

Merged
neerdoc merged 1 commit from macsome_13 into main 2026-08-02 10:54:20 +00:00
Owner

The previous cleanup deleted stale wanted rows by (artist, title, album),
but that's not how the app identifies a song anywhere else — _key() uses
isrc, falling back to artist+title with no album component, specifically
because different source playlists/providers often report a slightly
different (or blank) album string for the same track.

That mismatch let a stale row survive indefinitely: confirmed live, a
track ("Kings of Leon - Fans") matched at score 100 on every playlist
occurrence across three separate runs, yet kept reappearing in the buylist
and Plex Wish List each time, because the original stale row's stored
album didn't match the album reported by the occurrence that matched.

Now deletes by the same identity _key() uses (isrc when present, else
artist+title), and logs how many stale rows a match actually cleared so
this class of bug is visible in the logs instead of silent.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

The previous cleanup deleted stale wanted rows by (artist, title, album), but that's not how the app identifies a song anywhere else — _key() uses isrc, falling back to artist+title with no album component, specifically because different source playlists/providers often report a slightly different (or blank) album string for the same track. That mismatch let a stale row survive indefinitely: confirmed live, a track ("Kings of Leon - Fans") matched at score 100 on every playlist occurrence across three separate runs, yet kept reappearing in the buylist and Plex Wish List each time, because the original stale row's stored album didn't match the album reported by the occurrence that matched. Now deletes by the same identity _key() uses (isrc when present, else artist+title), and logs how many stale rows a match actually cleared so this class of bug is visible in the logs instead of silent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The previous cleanup deleted stale wanted rows by (artist, title, album),
but that's not how the app identifies a song anywhere else — _key() uses
isrc, falling back to artist+title with no album component, specifically
because different source playlists/providers often report a slightly
different (or blank) album string for the same track.

That mismatch let a stale row survive indefinitely: confirmed live, a
track ("Kings of Leon - Fans") matched at score 100 on every playlist
occurrence across three separate runs, yet kept reappearing in the buylist
and Plex Wish List each time, because the original stale row's stored
album didn't match the album reported by the occurrence that matched.

Now deletes by the same identity _key() uses (isrc when present, else
artist+title), and logs how many stale rows a match actually cleared so
this class of bug is visible in the logs instead of silent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WulfScience-FOSS/ha-music-own!54
No description provided.