digimezzo / dopamine

The audio player that keeps it simple
https://digimezzo.github.io/site/
GNU General Public License v3.0
1.44k stars 109 forks source link

Rating requires double click to save correct #622

Open Tiypoh opened 1 month ago

Tiypoh commented 1 month ago

When rating music with save to file turned on, it requires you clicking it, then clicking it again so it clears the rating, then clicking it again to get a correct file rating, otherwise it will only be a 1 star on the file and upon reloading the software it shows as 2 stars, with both of those values no matter what rating you click. Also upon clicking again to clear the rating, it appears to leave it the same on the file.

digimezzo commented 3 weeks ago

@Tiypoh Which preview are you on? This seems to have been fixed in preview 25. See: https://github.com/digimezzo/dopamine/issues/555

Tiypoh commented 2 weeks ago

@digimezzo i noticed it on preview 27 I think, Im on 29 now and it just happened, although Ill note it only seems to happen if the song hasnt been rated before, so if I change the rating on a song I've already rated it works fine, but every time if its never been rated it goes to 1 star no matter what. See attached screenshot below. I'll download the latest and recheck right now. image

Tiypoh commented 2 weeks ago

Yep just tried it on preview 31 and its still there. Been loving the app otherwise though man very nice job, everything a music player needs to be, nothing more or less, and unlike other ones it looks good too.

Tiypoh commented 2 weeks ago

@digimezzo Just as an idea as a hobby coder myself, perhaps when a rating is selected you could check to see if its equal to 0, and if so simply set the rating twice. I tried digging through the code to fix it myself, I think you can just change line 141 in dopamine/src/app/ui/components/rating /rating.component.spec.ts to trackRepositoryMock.verify((x) => x.updateRating(track.id, track.rating), Times.twice()); I think that would be a quick dirty fix for now but I could be wrong, I've never really worked with js or ts before.

Also I tried digging through logs to find out what it was trying to set the rating to, and noticed that they just say "successfully set rating" meaning it could also be a problem with TagLib, but posting the value its trying to set in the logs may be helpful to fix this.