How to set music rating
#1
Hi,

I've got loads of music files, and thought a good way of finding my best songs was to create a smart playlist which looks for 5 star rated songs.

I would then browse through and mark my best songs with 5 stars - I did a lot of this in Windows explorer, setting the rating in the mp3 files details.

This worked, but I found several tracks which already have a rating of 5 stars, so I set these tracks to have a rating of no stars in explorer.

But when I look in Kodi, the ones I've set to No Stars will have their 5 star rating.

I've tried rescanning music, but no joy.

If I set them in Kodi to no stars, it works - but this takes ages and Windows explorer is much faster.

Am I missing something, why does Kodi ignore the rating of the ones I set to No Stars?

Thanks
Reply
#2
I can replicate what you are seeing and it's not just because you're doing it in Windows Explorer. I've replicated by changing the ratings in mp3tag to zero and to blank and neither update the Kodi rating. I've also tested by changing another tag (Year) and rescanned and sure enough while the year updates in Kodi the rating doesn't go to zero. As you probably already know it updates fine if you change the rating to anything other than zero (or blank). So, it seems to be something specific to Kodi reading the POPM == 0 code on Update Library. I know it's not Dave's favourite subject, but if he's bored and feeling kind he may be able to take a look. In the meantime I'm afraid all I can do is confirm the behaviour.
If it's really bugging you then you can clear the database and re-scan and it will then update properly, though of course depending on the size of your library and speed of your machine that could be a bit of a pain.
Reply
#3
WelshPaul - Thanks for taking a look, I didn't appreciate that it works with any rating other than zero.

This seems like a bug to me, would you agree? I'll submit a bug report.

I also didn't think of rescanning the library, that will sort out my problem (though will take ages...)

Cheers.
Reply
#4
I think so. It will probably need Dave to look at it anyway. I'm always a bit nervous about submitting bug reports and like for someone cleverer than me to confirm them first, but I don't think we are both missing something obvious, and am pretty sure the problem is as I described.
Reply
#5
It seems to me setting rating of "no stars" in explorer just remove POPM.? Does it actually set
POPM to Windows Media Player 9 series with a value of 0?

scott s.
.
Reply
#6
(2017-01-26, 04:40)scott967 Wrote: It seems to me setting rating of "no stars" in explorer just remove POPM.? Does it actually set
POPM to Windows Media Player 9 series with a value of 0?

That's right, but I tried setting it to zero in mp3tag (and puddletag in linux) as well and it still didn't update. In any case shouldn't a blank be imported to the database as a null value rather than no change? It seems like in either instance it's just being ignored.
Reply
#7
OK, it does look like from the code in TagLoaderTagLib that POPM is only used if the current userrating is 0. Once it gets set, either from reading POPM or by user in the UI it can't be changed by changing POPM unless your POPM email is "ratings@xbmc.org".

scott s.
.
Reply
#8
(2017-01-25, 21:30)WelshPaul Wrote: I can replicate what you are seeing and it's not just because you're doing it in Windows Explorer....

...I know it's not Dave's favourite subject, but if he's bored and feeling kind he may be able to take a look. ...
LOL. Yes issues with ratings make me grumpy, but I try not to take that out on users. Not sure I am ever bored, but I'll take a look.
I have a suspicion it is about using 0 to mean "no rating"

(2017-01-25, 22:30)archie456 Wrote: WelshPaul - Thanks for taking a look, I didn't appreciate that it works with any rating other than zero.

This seems like a bug to me, would you agree? I'll submit a bug report.
Yes that is fine. This is a good way to do things - discuss on forum, see if others can repeat issue or provide an answer, then if a true bug has been found go ahead and raise a ticket.

Edit: Meanwhile @archie456 my hands-on workaround, assuming you don't want to lose playcount data etc. would be to edit the MyMusicXX.DB using a SQL browser. Take backups in case you mess up of course. Otherwise set the tag value to 3, out of 255 this gets taken as 1 of 10 (while 1, by a quirk of Winamp, gets taken as 2 of 10)
Reply
#9
(2017-01-27, 00:43)scott967 Wrote: OK, it does look like from the code in TagLoaderTagLib that POPM is only used if the current userrating is 0. Once it gets set, either from reading POPM or by user in the UI it can't be changed by changing POPM unless your POPM email is "ratings@xbmc.org".
No it isn't that. The POPM value is being scanned ok ("current" values at that point are those from tags, so this just ensures only one POPM frame is read).

(2017-01-27, 10:24)DaveBlake Wrote: I have a suspicion it is about using 0 to mean "no rating"
and it isn't that either, well not quite Smile

It is all about preserving userrating values set via Kodi from being wiped out to zero by a library update. A similar thing applies to thumbnails (see CMusicInfoScanner::FileItemsToAlbums). More a "design feature" than a bug per se.

I'm not sure I see the best logistical way around this, although the current situation - where rating > 0 in tags does overwrite that set via Kodi UI, but you can't zero it - does seem a little silly.

Just thinking aloud:
A redsign of how user dependant data is handled could be needed e.g. facts about the song such as title, track number etc. are different in nature to interpretive things like rating, last time played, playcount etc. that can change while Kodi is used. Drop the source, sometimes you need to, and you lose that data. What is needed is an export/import of those song values.

What is also needed is a bulk rating setting facility in Kodi, along with a more flexible and dynamic song selection facility, i.e set the rating to X for all these songs.

Open to suggestions (but with release of v17 imminent none of it is going to happen until v18, bar the most vital of bug fixes).
Reply
#10
If there is a tag for ratings, why not use that? How else would Windows Explorer, iTunes, etc save those value if not within the corresponding tag? Sure, one may invent some tricky, intelligent way that only kodi understands, write nfos or whatnot...
Why not simply write those value where they belong or store the thek in DB and allow the user to update their tags with an export?

Yes, I've read about different numbering schemes for ratings to make 0-5 fit into 0-255
Reply
#11
The issue is say you have not tagged with rating, just used Kodi UI to set values in the library, you don't want the next library update to wipe those values out. We are using 0 = no rating, hence tagging with a value of 0 is the same as not tagging. Set the rating tag to anything else, and library update will apply that value overwriting anything you did via Kodi.

I don't think any of the team want to get Kodi into writing tags, I sure don't. That can of worms can stay shut, anyway there is plenty of tools to mess about with tags.

BTW I am not defending anything in Kodi to do with ratings. It is like fixing some DIY done by someone else - you keep fixing the gaps, but the job is never satifying (why it makes me grumpy).
Reply
#12
In our previous discussion about ratings Dave said the logic in Kodi was as follows:

Quote:Code:
if (popm == 0) return 0;
if (popm < 0x19) return 1;
if (popm < 0x32) return 2;
if (popm < 0x4b) return 3;
if (popm < 0x64) return 4;
if (popm < 0x7d) return 5;
if (popm < 0x96) return 6;
if (popm < 0xaf) return 7;
if (popm < 0xc8) return 8;
if (popm < 0xe1) return 9;
else return 10;

would it make any difference if the logic were to say if POPM is 255 (or whatever the code for that is) then return rating = 10, ELSE return Zero or Blank, so that becomes the fall back option?
Reply
#13
FWIW that was v16 code, in v17 we have

Code:
//   Note 1 star written as 1 while half a star is 13, a higher value
  // Accommodate these mapped values in a scale from 0-255
  if (popm == 0) return 0;
  if (popm == 1) return 2;
  if (popm < 23) return 1;
  if (popm < 32) return 2;
  if (popm < 64) return 3;
  if (popm < 96) return 4;
  if (popm < 128) return 5;
  if (popm < 160) return 6;
  if (popm < 196) return 7;
  if (popm < 224) return 8;
  if (popm < 255) return 9;
  else return 10;
Paul I don't think your suggestion will work, POPM values are limited to 255 (=10)
Reply
#14
What I meant would look like this:

Code:
Code:
//   Note 1 star written as 1 while half a star is 13, a higher value
  // Accommodate these mapped values in a scale from 0-255
  if (popm == 1) return 2;
  if (popm < 23) return 1;
  if (popm < 32) return 2;
  if (popm < 64) return 3;
  if (popm < 96) return 4;
  if (popm < 128) return 5;
  if (popm < 160) return 6;
  if (popm < 196) return 7;
  if (popm < 224) return 8;
  if (popm < 255) return 9;
  if (popm == 255) return 10;
  else return 0;
Reply
#15
But then a POPM tag value of 0 would turn into rating value of 1 (out of 10). All those unrated mp3 songs without POPM tags would suddenly appear rated!
Reply

Logout Mark Read Team Forum Stats Members Help
How to set music rating0