I don't believe there is a command for that if you are using the standard configuration for Frodo, but...
Here are three commands for modifying the rating of a song in XBMC.
- "Increase rating"
- "Decrease rating"
- "Set rating X" (where X is 1-5)
The first two work fine.
The XBMC json api seems to be a bit buggy when using AudioLibrary.SetSongDetails. If you use "Set rating X", it will not really update the rating properly until you stop playing the current song. If you use "set rating x" and then use "increase rating" it will increase the rating based on what it was before you set the rating! If you use "Set rating X" and then ask for the rating it will give you the old value, unless you stop and then restart the song.
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="XBMC adjust ratings" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="503" name="Increase rating" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>Input.ExecuteAction&&"action":"increaserating"</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.SoftMute</cmdType>
<cmdString>60</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.Pause</cmdType>
<cmdString>100</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>Player.GetItem&&"playerid":0, "properties": ["rating"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>LastActionSuccess</ifType>
<ifParams>&&</ifParams>
<then>
<action>
<cmdType>XJson.ParseTokens</cmdType>
<cmdString>rating set to: {item.rating} stars</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<cmdString>{LastResult}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<cmdString>{LastResult}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<cmdString>I am not able to set the rating right now</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<action>
<cmdType>XJson.SoftUnMute</cmdType>
<cmdString />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Increase rating</phrase>
</command>
<command id="484" name="Decrease rating" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>Input.ExecuteAction&&"action":"decreaserating"</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.SoftMute</cmdType>
<cmdString>60</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.Pause</cmdType>
<cmdString>100</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>Player.GetItem&&"playerid":0, "properties": ["rating"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>LastActionSuccess</ifType>
<ifParams>&&</ifParams>
<then>
<action>
<cmdType>XJson.ParseTokens</cmdType>
<cmdString>rating set to: {item.rating} stars</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<cmdString>{LastResult}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<cmdString>{LastResult}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<cmdString>I am not able to set the rating right now</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<action>
<cmdType>XJson.SoftUnMute</cmdType>
<cmdString />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Decrease rating</phrase>
</command>
<command id="522" name="set rating" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.SoftMute</cmdType>
<cmdString>60</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>Player.GetItem&&"playerid":0, "properties": ["rating"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.ParseTokens</cmdType>
<cmdString>{item.id}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>AudioLibrary.SetSongDetails&&"songid": {LastResult}, "rating": {1}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<cmdString>Rating should now be {1}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.SoftUnMute</cmdType>
<cmdString />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>set rating</phrase>
<phrase optional="true">to</phrase>
<payloadRange>1,5</payloadRange>
<phrase optional="true">stars</phrase>
</command>
</commandGroup>