Bugzilla – Bug 9132
status command do not return updated ratings until SC restart
Last modified: 2009-07-31 10:27:09 UTC
If i send in a rating for a song with trackstat setrating 80 and after that do a {playerid} status 0 99999 tags:R , I will not get the rating for the updated song in my response. If I do a songs 0 9999 album_id:{0} tags:R , I get the rating so it is only for the status command you don't receive the updated ratings If I restart squeezecenter I get the new rating in my response.
Please don't preset targets.
Would this be yours to address
QA to reproduce
I'm confused, I thought trackstat only allows ratings 1-10?
Yes, 1-10 but the api can handle different formats 100 = 10 or 5 90=9 or 4,5 80=8 or 4 and so on..
Thanks Joggs. Now I have questions about the status inquiry, namely I don't see anything trackstat related when I do <playerid> status calls. Would you mind sharing the exact CLI commands you're using, the responses, and what you expect as a response? It sure would help me a lot. :-)
Are you sure this is TrackStat related at all? Are there any other CLI commands that use "%"?
(In reply to comment #6) > Thanks Joggs. Now I have questions about the status inquiry, namely I don't see > anything trackstat related when I do <playerid> status calls. > TrackStat only sets the rating in the standard tracks table in the SqueezeCenter database. When you run the status query I'm guessing that the status command reads the rating information from the tracks table. I'm pretty sure TrackStat isn't involved when you run the status command, it should only be involved when you change ratings.
I agree with Erland. Stage 1: I change the song rating which sets the song rating in the sq database. So far so good, the setting is now in the database. Stage2: If I now want to see the updated rating I can do it by using a) songs 0 9999 album_id:{0} tags:R -> I get the new rating in the response. Everything works as expected. b) {playerid} status 0 99999 tags:R -> This will not display the new rating, rather the old one which to me seems like some kind of caching because if i restart SQ I will get the new rating.
Thanks Erland, Joggs, I'm not able to reproduce this as you describe. Setting the rating from webUI also exhibits this issue. Steps to reproduce: Set a rating on for a file in trackstat, I used the webUI and set it to 4 stars (80). Use this command in CLI: songs 0 9999 album_id{0} tags:R Note the rating is 80%, now use this command in CLI: (playerid) status 0 9999 tags:R Note the rating is 80%, now change the rating, again I used webUI and set it to 2 stars (40) Try both CLI commands and notice that the status command is not updated, and the tag command is updated. Restart SqueezeCenter and the status command shows the updated rating. Thanks again for making this clear Joggs. Erland, I noticed your wiki entry for trackstat makes no mention of the status command, do you feel it should be supported? Would you be the right person to work on this?
Correction to my last comment I *AM* able to reproduce. Normally I proof-read, my bad!
Michael let me know if you need anything else from QA.
I guess this is only related to the TrackStat plugin? If so: how does it write the values to the DB? AFAICT the status query code is returning whatever is in the DB. I can only assume that it's not correctly written back before SC is shut down.
(In reply to comment #13) > I guess this is only related to the TrackStat plugin? > > If so: how does it write the values to the DB? AFAICT the status query code is > returning whatever is in the DB. I can only assume that it's not correctly > written back before SC is shut down. > TrackStat makes these calls on a Slim::Schema:Track object $track->persistent->set('rating' => $rating); $track->persistent->update();
change 24574 - playlist track objects can be outdated, if track rating or something has been changed since tracks have been queued up. If rating is requested in the status query, force the track object in the client's playlist to be updated
Fixed - Closed Message (SC) This bug has been fixed in the 7.3.3 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Correction: SqueezeCenter version is 7.3.2
Reduce number of active targets for SC