cpd73 wrote: 
> OK, in git/master (for 2.1.0) I have added (untested) support for this.
> To detect the plugin I call -["can", "trackstat", "getrating", "?"]- for
> TrackStat. If this returns "_can:1" then TrackStat is used. Otherwise I
> call -["can", "ratingslight", "getrating", "?"]- to check for
> ratingslight. This also needs to return "_can:1" If it does, I then call
> -["pref", "plugin.ratingslight:rating_10scale", "?"]- to check the
> rating scale. This should return 1 if 10 is max rating, otherwise 5 is
> assumed.
> 
> [Edit] So, basically if all "trackstat" ratings used by Material map
> onto "ratingslight" then it -should- work...

Ratings Light doesn't have a *get*rating function/dispatch because it
assumes that plugins and apps like Material fetch ratings directly from
LMS using tags:R.

Code:
--------------------
    lmsCommand("", ["can", "ratingslight", "setrating", "?"]).then(({data}) => 
{console.log(JSON.stringify(data));});
--------------------

"can" query for *set*rating returns -"_can":1- for Ratings Light (same
for TrackStat).

-Ratings Light- expects rating values between 0 and 5. Half-star ratings
like 3.5 are also supported and passed on to the LMS persistent
database. I suppose that should work because it did when I still faked
the TrackStat API while I was testing the plugin.


The -current- Material master version doesn't display any ratings for
me, not even if I fake the TrackStat API. If I take the store.js code
(580-594) from the previous 2.1 branch and replace ["can", "trackstat",
"getrating", "?"] with ["can", "ratingslight", "setrating", "?"] 
Material will display ratings.


------------------------------------------------------------------------
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

Reply via email to