_ratings not working in Windows?


https://picard.musicbrainz.org/docs/tags/ says that variable _ratings should have the MusicBrainz rating data.
but when I try to access the variable in a script that says for example
I get zippo, nada.

This is for a track “Hells Bells” for example
will return xml with a rating of 4.4

help? am I accessing this variable incorrectly? I don’t think so, if I do $set(my_rating,%_releasegroup%) I get “Back In Black” so I think that variable is just not being populated.

Is there anyway to get rating information from MusicBrainz using Picard?


It’s %_rating%, not %_ratings%


I’ve tried _rating, _ratings, rating, ratings, musicbrainz_rating, _musicbrainz_rating all the reasonable permutations. I’m using Picard for Windows. Can you produce a meaningful result?


Have you told Picard to enable ratings? If you go to Settings→Metadata→Ratings, are ratings enabled there?


Yes, Enable Track Ratings is checked. For completeness sake I’ve also tried it with Enable Track Ratings unchecked and that does not work either.

Maybe I should just submit a bug to the Dev team?


I’ve come across something like this before. There it was an issue in not displaying multiple ratings with different IDs, but it likely stems from the same issue: the rating field edit is put in the right-click menu rather than the bottom pane, and removing it from the latter had unexpected consequences. You can install the View Script Variables plugin and double-check yourself if you want, but I don’t remember seeing any rating variable on that list.

This does definitely seem like a bug, and if none of us submitted it before, then definitely go ahead. The one thing is that there isn’t much of a dev team per se, but mostly just volunteers who fix whatever catches their eye or their workflow. Submitting the report will certainly give it much more of a chance than otherwise, but it’s no promise on its own. Know any Python yourself? :wink:


Yes, setting the following script works for me and will show the my_rating tag in the bottom list for tracks that have a rating:


Works also when loading the track you linked above as a non-album-track into Picard. What happens when you right click on a track? Does it show the rating stars filled up?

EDIT: I think I know what causes the issue :slight_smile: Picard only uses your personal ratings, not community ratings. So if you have not rated a track yourself it will not add the ratings to the tags (you can however set the rating in Picard, and it also rate on musicbrainz.org). The idea was that a rating is a very personal view, and the fact that I find a certain song amazing probably has not much meaning to you. But having the option to use the community rating makes sense, of course.


Oh look, I already had opened an issue for this: https://tickets.metabrainz.org/browse/PICARD-797

Now it just needs to get implemented :slight_smile: