R-a-dio / valkyrie

R/a/dio software stack
https://r-a-d.io
MIT License
5 stars 3 forks source link

website/admin: currently playing song shows up on last played when saving profile in admin panel #150

Open icxes opened 1 month ago

icxes commented 1 month ago

To reproduce, have the last played page and someone's profile page open. Change "DJ text" on someone's profile, press "Save", switch to last played page and refresh. Last played log has multiple entries for the same song.

Wessie commented 1 month ago

because my dev env is down and I'll rather not forget later, the issue is the conditions in the functions here https://github.com/R-a-dio/valkyrie/blob/master/manager/api.go#L175 being reversed, both the user and the song one should be checking for a negative match (and probably only for their uniqueness sign, so the IDs and not the EqualTo the song is using)