Hello Everyone,
**I want to preface this with thanking JitterJames for helping simplify this integration without the need for modifying the plugin like I originally thought**
Just thought I'd post up what I had been working on the past couple days. I've been a huge user of google music and most recently using it within Kodi. You can find the plugin for Kodi here:
http://forum.kodi.tv/showthread.php?tid=200640While installing and setting up the plugin I noticed it had a local db called googlemusic.db . Knowing that within the xSql plugin we can generate payloads using these database files an idea was born.
Here is the SQL queries used to generate the 4 payload files needed.
Custom select playlist_id, name from playlists gmusicplaylist False
Custom select distinct album from songs gmusicalbum True
Custom select ('song_id='||song_id||'&artistart='||artistart), title from songs gmusicsong False
Custom select distinct artist from songs gmusicartist True
The artist and album payloads are phrase only files while the other 2 are value / phrase.
If you are using the custom db field on the plugin update to the latest VoxCommando just recently uploaded by JitterJames which includes fixes to the xSql plugin.
Once you generate your payloads here is the 4 commands to use. Thanks to JitterJames again for making these a little more smooth.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.0-->
<commandGroup open="True" name="Kodi GMusic" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="434" name="Play Google Playlist {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<params>
<param>Player.Open</param>
<param>"item":{"file":"plugin://plugin.audio.googlemusic.exp/?action=play_all&playlist_id={1}&shuffle=true"}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase optional="true">play</phrase>
<phrase>google playlist</phrase>
<payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\gmusicplaylist.xml</payloadFromXML>
</command>
<command id="417" name="Play Google Artist {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<params>
<param>Player.Open</param>
<param>"item":{"file":"plugin://plugin.audio.googlemusic.exp/?action=play_all&filter_type=artist&filter_criteria={1}&shuffle=true"}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase optional="true">play</phrase>
<phrase>google artist</phrase>
<payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\gmusicartist.xml</payloadFromXML>
</command>
<command id="407" name="Play Google Album {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<params>
<param>Player.Open</param>
<param>"item":{"file":"plugin://plugin.audio.googlemusic.exp/?action=play_all&filter_type=album&filter_criteria={1}"}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase optional="true">play</phrase>
<phrase>google album</phrase>
<payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\gmusicalbum.xml</payloadFromXML>
</command>
<command id="423" name="Play Google Song {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>XJson.Raw</cmdType>
<params>
<param>Player.Open</param>
<param>"item":{"file":"plugin://plugin.audio.googlemusic.exp/?action=play_song&{1}"}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase optional="true">play</phrase>
<phrase>google</phrase>
<phrase>song, track</phrase>
<payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\gmusicsong.xml</payloadFromXML>
</command>
</commandGroup>
Here is a video demonstration of how it is working.
Feel free to ask any questions!