-
Notifications
You must be signed in to change notification settings - Fork 1
CLI commands
-
['ratingslight', 'setratingpercent', 'trackid', 'rating', 'incremental']
The recommendedsetratingpercent
command expects a rating value in the range of 0 to 100.or
-
['ratingslight', 'setrating', 'trackid', 'rating', 'incremental']
The only difference to the command above is the rating scale: thesetrating
command expects a rating value in the range of 0 to 5.
Half-star ratings like 3.5 are supported. Use a decimal point, not a comma.
Example:
The commands ['ratingslight', 'setratingpercent', 'track_id:12345', 'rating:70']
and ['ratingslight', 'setrating', 'track_id:12345', 'rating:3.5']
will both store a rating value of 70 (3.5 stars * 20) in the database for the track with the track id 12345.
Use the incremental parameter with + or - to add/subtract a rating value to/from the current rating value.
Example 1:
The command ['ratingslight', 'setratingpercent', 'track_id:12345', 'rating:20', 'incremental:+']
will add 1 star to the current rating value of the track with the track id 12345.
Example 2:
You could use incremental rating changes with the KidsPlay plugin. Map this command to a button on your Boom or Radio to decrease the current track's rating by 1 star:
ratingslight setratingpercent track_id:{CURRENT_TRACK_ID} rating:20 incremental:-;
['ratingslight', 'getrating', 'trackid']
Use the getrating
command to retrieve the rating value (in the range of 0 to 100) for a track.
You can also get notified of track rating changes in plugins and applets by subscribing to
-
applets:
/slim/ratingslightchangedratingupdate
-
plugins:
['ratingslight', 'changedrating']