Wondering if the following is possible.
1. Request the band bio text. when in XBMC pressing I over an artist or album will get relevant information about that band. I want the text to use with TTS.
2. Save to favourites. What track or podcast is currently playing, send a request via XJSON do so.
3. This one is interesting. Increase or decrease the rating of a track, as to say "I like this song" the rating goes up a notch if applicable and vice versa as in "I don't like this song"
I'm starting to understand the wiki and it seems no.1 is possible. YAY!
I take that back I'm so confused..
Quote from: thesystemera on May 07, 2013, 06:11:10 AM
3. This one is interesting. Increase or decrease the rating of a track, as to say "I like this song" the rating goes up a notch if applicable and vice versa as in "I don't like this song"
I don't
personally find this useful, I like to say "set rating X", but that doesn't matter. Here are the two commands you need. Add your own phrases etc...
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="XJSON Adjust rating" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="888" 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>
</command>
<command id="905" 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>
</command>
</commandGroup>
Quote from: thesystemera on May 07, 2013, 06:11:10 AM
1. Request the band bio text. when in XBMC pressing I over an artist or album will get relevant information about that band. I want the text to use with TTS.
In this case we need to use infolabels: http://wiki.xbmc.org/index.php?title=InfoLabels
<?xml version="1.0" encoding="utf-16"?>
<command id="497" name="Tell me about this artist" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>XBMC.GetInfoBooleans&&"booleans": ["Container.Content(artists)"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)Contains(B)</ifType>
<ifParams>{LastResult}&&true</ifParams>
<then>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>XBMC.GetInfoLabels&&"labels": ["ListItem.Property(Artist_Description)"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.ParseTokens</cmdType>
<cmdString>{[0]}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<cmdString>{LastResult}&&3000&&-5</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.StopMacro</cmdType>
<cmdString />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>XBMC.GetInfoBooleans&&"booleans": ["Container.Content(albums)"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)Contains(B)</ifType>
<ifParams>{LastResult}&&true</ifParams>
<then>
<action>
<cmdType>XJson.Raw</cmdType>
<cmdString>XBMC.GetInfoLabels&&"labels": ["ListItem.Property(Album_Description)"]</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>XJson.ParseTokens</cmdType>
<cmdString>{[0]}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<cmdString>{LastResult}&&3000&&-5</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.StopMacro</cmdType>
<cmdString />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<phrase>Tell me about this</phrase>
<phrase>band, artist, group</phrase>
</command>
Quote from: thesystemera on May 07, 2013, 06:11:10 AM
2. Save to favourites. What track or podcast is currently playing, send a request via XJSON do so.
I don't think this one is possible yet, but maybe in the next version. See the link:
https://github.com/xbmc/xbmc/pull/2600
For demonstration purposes its not necessaries, but otherwise good to know...