Understanding Music Ratings Philosophy
#7
(2019-03-18, 15:47)DaveBlake Wrote: Honestly ratings is one of the music libaray topics I hate the most. For v17 someone decided to try and make music rating handling the same as video https://github.com/xbmc/xbmc/pull/8405 and the transition has been painful for skinners and users.

The end result was that for v17 onwards albums and songs have two fields - rating (and related votes) and userrating. Both now held internally as a score out of 10, although rating is a decimal and userrating an integer.

For albums rating and userrating can be set via NFO files or using JSON API AudioLibrary.SetAlbumDetails.

For songs rating and userrating can set using JSON API AudioLibrary.SetAlbumDetails. Userrating is initially populated with the value scanned from the RATING/POPM tag embedded in the music file and converted to a number out of 10 depending on the tag format. It can also be adjusted via GUI and possibly Python script for the currently playing song.

There are MUSICPLAYER and LISTITEM info labels for both values. Both can be used as sort order and in smartplaylist rules.

However if you think about it then you will realise that the song rating field is pretty useless (unless you have something maintaining it via JSON API and a skin that shows it). I would expect  $Info[MusicPlayer.Rating] to be blank, and only $Info[MusicPlayer.Userrating] to have values.
 
(2019-03-18, 00:00)jasn Wrote: As far as graphically displaying ratings as stars, only the $Info[MusicPlayer.Rating] works as a resource.  Using $Info[Music PlayerUser.Rating] as a resource does not work.
That is the reverse of what I expect, are you sure you have it that way around becase I don't see it. Although
(2019-03-18, 01:08)scott967 Wrote: I will have to play with the MusicPlayer.offset(n) infolabels to see how they are working. Keep in mind the design/programming for the labels was refactored after Kodi 18 alpha 1 so there could be latent bugs from that.
is possible too. 
Thanks @DaveBlake.  I think I am mistaken about the $Info[MusicPlayer.UserRating] values being unpopulated.  I believe the inability to use it is skin related, as it functions in Aeon MQ7 but not AeonMQ8.  For whatever reason it fails to display for MQ8, and I do not know well enough to chase the problem down beyond a few .xml files.  I am, however, learnong a lot from the Wiki.

I follow also your background, re: how the change from V16 to V17 took place and how it has become complicated.  Chaulk it up to the change being "a good idea, but not a great idea"? Smile

If it were possible to assign "offset" functionality to UserRating as it is for Rating I think that would be a nice step.
Reply


Messages In This Thread
RE: Understanding Music Ratings Philosophy - by jasn - 2019-03-18, 16:18
Logout Mark Read Team Forum Stats Members Help
Understanding Music Ratings Philosophy0