cpd73 wrote:
> Ratings are sent by LMS in the status response - but only if 'R' is
> included in the 'tags:' parameter. Material will only add 'R' in the
> status request if ratings are being shown.
I think I found a solution. I only need a little help implementing it:
#1 I could include 'k' in the default 'tags:' that Material requests.
Then the comment tag value is already present in the playerstatus
response. ✅
#3 You kindly enabled the display of read only ratings already in the
2.1 branch. So if there is a rating value Material would display it.
✅
#2 So all I need now is Material to translate keywords in a track's
comment tag (if present, else rating = 0) and set this as the rating
value (= as if the 'R' tag had returned this value).
In jivelite's NowPlaying screen this function would do it:
Code:
--------------------
local ratingKeyword = "favstars"
local tracktext_glow_keyword = "Delphine"
local commentRating = ""
if currentCommentInfo then
_, _, commentRating = string.find(currentCommentInfo,
ratingKeyword.."(%d)")
if commentRating then
self.myrating:setStyle('ratingLevel'..commentRating)
end
-- if track belongs to Delphine's collection display track
title in glowing font (text shadow)
if currentCommentInfo:find(tracktext_glow_keyword) then
self.trackTitle:setStyle("nptrack_glow")
end
end
--------------------
So if a track's comment tag includes the keyword 'favstars3' it would
display rating = 3 stars.
I don't know how to translate zhis lua function into JS and where to
insert this into your code.
If you could help me out here or a commit in the 2.1 branch, I'd be very
happy.
Thank you so much.
------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=109624
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins