Solved [Kodi v17 Krypton] Ratings a bit mixed up
#16
You just need 10 pngs (typ instead of jpg to allow transparency) with the needed "look" named 1.png - 10.png, then in the xml code use an image control with the filename obtained from the userrating infolabel concatenated with ".png". The same set of pngs should work for both video and music. But from a UI layout it gets a bit harder if you want a personal rating shown as "stars" and also some crowd-sourced rating. (Not sure if POPM or RATING tags get used that way, there could be any number of different ratings available in those tags.)

scott s.
.
Reply
#17
What I meant was for those of us who do want to maintain the old similarity to music players we can create separate folders for music and video. So under the skin's media folder I can have a video stars (1-10 wholes) which looks like IMDB and is the default starratings folder, but I can also have a music stars folder which has 1-5 with halves, which is what I used in my example above, calling it as you describe:

Code:
<texture>musicstars/$INFO[MusicPlayer.UserRating].png</texture>

The problem is locating all the places (or at least the relevant places) that ratings are included as controls in the hundreds of xml files in each skin. Probably need to venture into the dreaded Includes.xml - something to do on halloween.

I agree trying to use crowd source ratings at a track level may be a nightmare. Even though mp3tag has a number of different rating tags available they behave in different ways, so it's all a bit like spinning plates on sticks. Even I'm not that obsessive though, and seeing the ratings that AllMusic give things just makes me angry anyway (extra star for having a beard apparently).
Reply
#18
Here is a nice star transparent PNG which could be used

Image
Reply
#19
(2016-10-07, 22:00)WelshPaul Wrote: What I meant was for those of us who do want to maintain the old similarity to music players we can create separate folders for music and video. So under the skin's media folder I can have a video stars (1-10 wholes) which looks like IMDB and is the default starratings folder, but I can also have a music stars folder which has 1-5 with halves, which is what I used in my example above, calling it as you describe:

Code:
<texture>musicstars/$INFO[MusicPlayer.UserRating].png</texture>

The problem is locating all the places (or at least the relevant places) that ratings are included as controls in the hundreds of xml files in each skin. Probably need to venture into the dreaded Includes.xml - something to do on halloween.

I agree trying to use crowd source ratings at a track level may be a nightmare. Even though mp3tag has a number of different rating tags available they behave in different ways, so it's all a bit like spinning plates on sticks. Even I'm not that obsessive though, and seeing the ratings that AllMusic give things just makes me angry anyway (extra star for having a beard apparently).

For freeware tool suggest notepad++ and there is a plug-in for xml which adds some features. You can search *.xml in the 1080i or 720p folders for text string or RegEx and get all the hits in a panel. I took a quick and dirty approach that just mapped 1-10 to the existing 5 full stars, but adding half-stars would be an improvement.

scott s.
.
Reply
#20
Sorry to dredge up this thread as I know Dave's not that interested in ratings, but I've been struggling away trying to understand the new 10 point rating system and delving into the POPM tag.

Just to recap - Kodi v17 adds in a userrating option for music, which is marks out of 10. I think the intent is for people to use Kodi to do the ratings in much the same way iTunes does, i.e. storing in the database but not updating the files. This may be great for people with small collections and who haven't previously rated their music. But for those of us who already have large(ish) collections already with ratings on a 10 scale embedded in the files it would be better to import. As most media players use a 1-5 scale with half marks Kodi has been written to double the imported value to give a 1-10 user rating. So, as I said iTunes doesn't embed ratings, wmp and winamp were only ever marked in whole numbers so only 1-5, so the easiest one to use for half marks was Media Monkey. This is helpfully included in mp3tag, using the field %rating mm%. What I didn't understand and Dave pointed out is that this %rating mm% is just a surface representation of what is stored in the popularimeter tag. The problem has been corruption on importing the files to Kodi giving the wrong rating, and therefore messing up playlists which are reliant on rating as the main filter.

I have found the underlying POPM values for media monkey. They're in the format [email protected]:rating:playcount and the rating values are as follows:

13 = 0.5 star shown as 1 in Kodi
1 = 1 star shown as 1 in Kodi
54 = 1.5 star shown as 3 in Kodi
64 = 2 star shown as 3 in Kodi
118 = 2.5 star shown as 5 in Kodi
128 = 3 star shown as 6 in Kodi
186 = 3.5 star shown as 8 in Kodi
196 = 4 star shown as 8 in Kodi
242 = 4.5 star shown as 10 in Kodi
255 = 5 star shown as 10 in Kodi

So I tried amending the numbers to those in Dave's earlier post

(2016-10-05, 20:04)DaveBlake Wrote: MediaMonkey:
0.5=26, 1=51, 1.5=76, 2=102, 2.5=128, 3=153, 3.5=178, 4=204, 4.5=230, 5=255

these gave the following userratings in Kodi:
26 = 2 ; 51 = 3 ; 76 = 4; 102 = 5 ; 128 = 6 ; 153 = 7 ; 178 = 8 ; 204 = 9 ; 230 = 10 ; 255 = 10

So, combining the 2 I think the correct sequence should probably be:
13 ; 26 ; 51 ; 76 ; 102 ; 128 ; 153 ; 178 ; 204 ; 255

To import as a one-off I overwrote the POPM tag with the above values and rescanned my music files and they imported perfectly. However, this buggers up the ratings in other programs, i.e. media monkey itself cannot now understand the ratings. So, it's ok as a one-off import but a bit of a pain to change each time a new album is added.

The wiki says you can use a TXXX tag instead, which would avoid alot of this POPM mess, however I couldn't get that to import to Kodi and assume it's been deprecated. I wonder if you can confirm this and whether it's a massive job to re-institute it. Alternatively I don't know who controls the POPM import values and how easy it is to amend them, I know JMarshall used to. I've tried other tagging software, like Puddletag, but at the moment I can't find a simple method that doesn't involve overwriting the POPM tags each time to import to Kodi and then reverting them back again after library update.

Anyway, that's where I've got to with trying to import ratings to Kodi v17.
Reply
#21
Paul no I don't use ratings myself (nor mp3 much come to that), but I am interested in helping you and others that do. I just get wexed since I was n't part of the decision to change the ratings facility in the first place. And since I don't use it myself I could miss something. But at the moment I'm the only dev likely to work on the music library specifically or tag processing, of course anyone with the skills could submit a PR (and wait).

Quote: The problem has been corruption on importing the files to Kodi giving the wrong rating, and therefore messing up playlists which are reliant on rating as the main filter.
I see how Kodi storing rating out of 10 rather than five can cause issues with scraping the album value from NFO whch (historically) has it out of 5, as we have previously discussed. But I don't see why you are having problems with POPM and user rating for songs?

There is a comment in the code that different POPM-compatible players use various schemes to map the 0 to 255 POPM value to/from a rating out of 5, some with half way values some without. I''m just going to believe that is true.

Kodi v17 decodes that POPM value as follows:
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;

Why is that problematic? I may be missing something because I don't use this myself, but I see no reason to change POPM tag values.
Reply
#22
Because in my post I was trying to explain that the POPM values stored by media monkey for 0.5 and 1 star are both less than 19, therefore overlap your "return 1" command. The 1.5 and 2 stars are 54 and 64 which are both in the 46 to 64 range and therefore also overlap, etc, etc. The only way to get around this currently is to artificially change the POPM value, but that has knock on effects in other programs.

As an aside Dave, I wonder whether Music Corner has created something of a rod for your back and a circular reference for us, if you are the only Team-Kodi person who bothers to look at these issues. While I appreciate you try to answer everyone's questions, it is a little fruitless if as you say you didn't instigate the change and don't even use it. Shouldn't those who did try to address these issues.
Reply
#23
(2016-11-04, 19:03)WelshPaul Wrote: As an aside Dave, I wonder whether Music Corner has created something of a rod for your back and a circular reference for us, if you are the only Team-Kodi person who bothers to look at these issues. While I appreciate you try to answer everyone's questions, it is a little fruitless if as you say you didn't instigate the change and don't even use it. Shouldn't those who did try to address these issues.
I had a good chuckle at that one Paul, "should" does not come into how the Kodi team works. Banish that kind of thinking, it leads nowhere.

Talking to me isn't friutless, I can, have, and will continue to try to fix things. I love music corner, rather than the forum splatter we have before. But the rest of you need to know I'm pretty much all you have got at the moment for music library specific things. I'm one guy with limited time and my own interests, a volumnteer doing it for free because I find it interesting etc. I don't want a medal or praise etc., but patience, good humour and general helpfulness is always nice. Smile

Back to the POPM issue... and seeking to understand. If I get the issue then I can fix it.

The notes I have says that MediaMonkey encodes ratings as follows
0.5=26, 1=51, 1.5=76, 2=102, 2.5=128, 3=153, 3.5=178, 4=204, 4.5=230, 5=255

Does this seem to be correct? Have you found something from media Monkey I can reference?
For comparison Windows Media Player 9 Series uses 1 = 1, 2 = 64, 3=128, 4=196 (not 192), 5=255, and I guess we need to cover that too.

Since at least Frodo Kodi converted POPM like this
Code:
if (popm == 0) return '0';
  if (popm < 0x40) return '1';
  if (popm < 0x80) return '2';
  if (popm < 0xc0) return '3';
  if (popm < 0xff) return '4';
return '5';
loosing any half values MediaMonkey may have included.

MM 0.5=26 was Kodi 1 in v17 is 2
MM 1=51 was Kodi 1 in v17 is 3
MM 1.5=76 was Kodi 2 in v17 is 4
MM 2=102 was Kodi 2 in v17 is 5
MM 2.5=128 was Kodi 3 in v17 is 6
MM 3=153 was Kodi 3 in v17 is 7
MM 3.5=178 was Kodi 3 in v17 is 8
MM 4=204 was Kodi 4 in v17 is 9
MM 4.5=230 was Kodi 4 in v17 is 10
MM 5=255 was Kodi 5 in v17 is 10

OK, so whereas Kodi was fudging the values one way, effectively rounding 0.5, 1.5, 2.5 and 3.5 up but 4.5 down, it is now fudging and producing a bias towards 10. That doesn't seem right (assuming the Media Monkey scheme is definative). Looks like a mistake to me in the way the new out of 10 stuff was implemented.

How definative is the Media Monkey rating scheme? Remember I don't rate stuff, I have no idea on scope.
Reply
#24
(2016-11-04, 17:55)WelshPaul Wrote: 13 = 0.5 star shown as 1 in Kodi
1 = 1 star shown as 1 in Kodi
54 = 1.5 star shown as 3 in Kodi
64 = 2 star shown as 3 in Kodi
118 = 2.5 star shown as 5 in Kodi
128 = 3 star shown as 6 in Kodi
186 = 3.5 star shown as 8 in Kodi
196 = 4 star shown as 8 in Kodi
242 = 4.5 star shown as 10 in Kodi
255 = 5 star shown as 10 in Kodi

No, what I'm seeing is as listed above. I'll try to show you in screenshots. The first is media monkey with a folder of 10 tracks rated ascending from 0.5 to 5. The second is from Puddletag showing how the POPM tag for this folder shows, reflecting the numbers above. I don't know how else I can explain this. It would of course be really useful if someone else has been trying to import ratings. I'm feeling I'm the only person who would want to do this !!!

Image

Image
Reply
#25
Interesting thread on MM here: http://forum.mediamonkey.com/viewtopic.php?f=7&t=40532

Unfortunately didn't indicate what's implemented in current Mm 4.1. I looked in their bug tracker and this seems to be the last code change: http://www.ventismedia.com/mantis/view.php?id=10498

scott s.
.
Reply
#26
Thanks Scott, yes there are hundreds of discussions about POPM and sync issues on the mp3tag and media monkey sites. What I'm getting at is that even wikipedia under its entry for ID3 has a sub-heading ID3v2 rating tag issue. I get the feeling if we spent a lot of time (wasting Dave's time) trying to solve the POPM values of media monkey pretty soon after someone will come along saying they're using XYZ Player and it doesn't scan properly. This is why I thought the TXXX field was valuable as described in the wiki. Firstly in tagging programs you could actually use numbers instead of a [email protected]:255:0 type reference. Removing that seems to be a retrograde step and we should probably be trying to be less reliant on POPM than more. I'm actually thinking if that's really not possible a quicker work-around may even be the same as we recommended to Jasn the other day, i.e. scan the numbers to a different unused field (eg 'votes') and then use sql to copy those values to the userrating column, however I worry that a library re-scan would just overwrite everything with the wrong values again..

Hope that makes sense.
Reply
#27
Unfortunately, like much else, we have no way to know how many users try to import ratings or what they use to tag them.

It seems to me that Media Monkey have cocked up their POPM implementation when in 2013 they changed 1 star to write POPM value 1 (instead of 23), but left 0.5 star as 13. They seem to have forgotten they have half stars, also what they list now is completely different to their original schema.

Meanwhile back at Kodi. If we knew for sure what the Media Monkey schema was, and a way to know that was what was in the tags then Kodi could handle it. Quite a simple fix, if we had the facts.

Previous Kodi versions divided 255 into 5 steps - <64, <128, <192, <255, =255 - here only 255 is max
V17 divides 255 into 10 steps - <25, <50, <75, <100, <125, <150, <175, <200, <225, <=255 - here 225 to 255 is max, bigger than the 25 internal of all the other steps

If I was implementing this then I would say 255 / 10 = 25.5, and go
<27, <52, <78, <103, <129, <154, <180, <203, <231, <=255
which is much like the original Media Monkey schema. So what they used to do long ago makes sense to me Smile
What they do now, shown my Paul's testing, not so much. Sad

But I do wonder if there is any value in switching to my schema rather than the 25 interval one we have in v17 so far? It would work better with any music rated in an old version of Media Monkey, but how useful is that?
Reply
#28
Seems someone has already done the player comparison work here http://www.mediamonkey.com/forum/viewtop...M&start=30
That gives
Code:
Rating WMP 12            Win 8.1  Winamp   foobar2000   MediaMonkey
       Etc.*   WMP 12    Explor   v5.666    v1.3.2       4.1.2.1706                     Proposed reading
stars  writes (reads)    (reads)  (reads)   (reads)     writes       (reads)            for MediaMonkey
------ ----------------------------------------------------------------------------    ------------------

0      ---                                                0 (          0,     2-8)  |  0             0
0.5    ---                                               13 (       9-18,   30-39)  |  0.5        2-22
1        1    (1-31)    (1-31)    (1-31)    (1-32)        1 ( 1,   19-28,   40-49)  |  1      1, 23-31
1.5    ---                                               54 (29,   50-59,   70-90)  |  1.5       32-63
2       64    (32-95)   (32-95)   (32-95)   (33-96)      64 (      60-69,  91-113)  |  2         64-95
2.5    ---                                              118 (    114-123, 134-141)  |  2.5      96-127
3      128    (96-159)  (96-159)  (96-159)  (97-159)    128 (    124-133, 142-167)  |  3       128-159
3.5    ---                                              186 (             168-191)  |  3.5     160-195
4      196    (160-221) (160-223) (160-223) (160-223)   196 (             192-218)  |  4       196-223
4.5    ---                                              242 (             219-247)  |  4.5     224-254
5      255    (222-255) (224-255) (224-255) (224-255)   255 (             248-255)  |  5           255
* WMP 12, Win 8.1, Winamp and foobar2000 all write the same 5 values.

I propose that I change the mapping Kodi uses to be
Code:
Stars  POPM      Kodi
       Values    Rating
-----------------------

0             0   0
0.5        2-22   1
1      1, 23-31   2
1.5       32-63   3
2         64-95   4
2.5      96-127   5
3       128-159   6
3.5     160-195   7
4       196-223   8
4.5     224-254   9
5           255  10

This covers what is written by WMP 12, Win 8.1, Winamp, foobar2000 and Media Monkey, about as near to de-facto as we can get. How does that sound?
Reply
#29
Thanks so much for spending the time to look into this Dave and Scott. I've been trying to think if there are any other players out there that are likely to come out of the woodwork that would not fit into this scheme. I should clarify that I don't use Media Monkey, but as rating_mm is the only one in mp3tag that allows half-marks it's how I copy my iTunes ratings (which are in the DB not the file) into Kodi.

I guess we just have to rely on anyone who is using something else to shout. Otherwise I'd be very grateful of the update as it would save me an awful lot of time.
Reply
#30
Paul can you remind me what OS you use so I can create a test build for you, or would you rather just let me have the test files you created in media Monkey? No one else is going to be up for testing this, and I would like to get it tested a bit if I am going to push for it to be in v17.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[Kodi v17 Krypton] Ratings a bit mixed up00