Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - DexDeadly

Pages: [1]
1
Hello guys,

So I'm using a program called MoviePosterApp, not sure if anyones heard of it but it basically runs through movie posters in your library or from TheMovieDB to show upcoming movies.  www.movieposterapp.com if you want to check it out. 

Anyway it uses basic http commands so I've gone ahead and have actually made a few different options for displaying different movie posters by name using voxcommando.  I"ll have a video of me doing this soon.  However I've come across a tricky one that I'm a little stumped on and looking for some ideas on how to make this work.  Here is my current command that I've created.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.0-->
<commandGroup open="True" name="Show Times" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="132" name="Add Showtime" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>(A)&lt;(B)</ifType>
      <ifParams>{5}&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>op1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>op1</param>
            <param>{5}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>(A)&lt;(B)</ifType>
      <ifParams>{6}&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>op2</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>op2</param>
            <param>{6}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://captainamerica:8082/showtimes.html?addShowtime({1},{2}%20{3}%20{4}%20{var.op1}%20{var.op2})</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>add poster showtime</phrase>
    <phrase optional="true">for</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcIMDB.xml</payloadFromXML>
    <payloadList>Tonight,Tomorrow,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</payloadList>
    <payloadList optional="true">at</payloadList>
    <payloadRange>1,24</payloadRange>
    <payloadList optional="true">:15,:30,:45</payloadList>
    <payloadList>AM,PM</payloadList>
  </command>
</commandGroup>

I tried a few different ways of just passing the payload directly over in the command but the information wasn't passing along.  I've found that if I structure it this way I can get it to post almost 100% correct. Except when you don't use the option variables it tries to send stuff along that makes it break a bit.  Is there a way that if the variable isn't used that it just skips it?  Let me know if I am not explaining this correctly. 

2
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=200640

While 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||'&amp;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.

Code: [Select]
<?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&amp;playlist_id={1}&amp;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&amp;filter_type=artist&amp;filter_criteria={1}&amp;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&amp;filter_type=album&amp;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&amp;{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!

3
Hello, so I've been playing around with the google music plugin on Kodi and it has a local database.  I'm looking to pull some information out of it however when I set it as a custom db using the xSQL plugin and pointed the custom line to that database. However it seems when I hit generate it doesn't work.  I verified that my select statement does work by placing the database in the music line of the plugin and then hit save and generate and it then generated with no issues.  Is there an issue with selecting custom from the dropdown? 

Once I have the googlemusic working I'll post it up for those who want it.  Right now I have it working and playing a playlist or a single song.   I'm working on submitting a search to display the results on the screen and playing albums but the plugin doesn't pull that information to its local db just yet.  I've reached out to the developer of the plugin to see if we can pull that information.  This will be a nice alternative to local media.

4
I want to say I heard this work when I maybe first installed this but now it doesn't seem to work.  When I'm saying "What Movie is this" it states the movie then says staring and then nothing.  I thought it would say the 3 main stars of the movie / tv show.currently this is what it looks like. 



Now if I do a test in postman to see how the cast comes back it looks like the following:
http://10.1.1.70:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetItem","params":{"playerid":1,"properties":["cast"]}, "id": "VideoGetItem"}

information is returned as the following:
Code: [Select]
{
  "id": "VideoGetItem",
  "jsonrpc": "2.0",
  "result": {
    "item": {
      "cast": [
        {
          "name": "Jeremy Clarkson",
          "order": 1,
          "role": "himself",
          "thumbnail": "image://http%3a%2f%2f10.1.1.25%3a8096%2femby%2fItems%2f21c34fd934fe6d5bd8b286539b7f84d2%2fImages%2fPrimary%3fMaxWidth%3d400%26MaxHeight%3d400%26Index%3d0%26Tag%3d358f4d9b42d2568103ad79db8a3dddb4/"
        },
        {
          "name": "Jonathan Palmer",
          "order": 2,
          "role": "Himself",
          "thumbnail": "image://http%3a%2f%2f10.1.1.25%3a8096%2femby%2fItems%2f97da624e6b257227ddf03bf7f292d0d3%2fImages%2fPrimary%3fMaxWidth%3d400%26MaxHeight%3d400%26Index%3d0%26Tag%3da6ec76a7621a7dab137ff5426d34d884/"
        },
        {
          "name": "Russ Swift",
          "order": 3,
          "role": "Himself",
          "thumbnail": "image://http%3a%2f%2f10.1.1.25%3a8096%2femby%2fItems%2f312d155e42d314bd7c0b563a859eb655%2fImages%2fPrimary%3fMaxWidth%3d400%26MaxHeight%3d400%26Index%3d0%26Tag%3d31dcd3dd6134011a954ae409648923a2/"
        }
      ],
      "id": 46,
      "label": "Clarkson: No Limits",
      "type": "movie"
    }
  }
}

if I change {lastresult} to {item.cast} it'll start speaking everything there.  Is there anyway to parse just the name out when it is returned back so that I can just here the names and not it trying to read every single item between the cast brackets?  I've been programming so much in this thing giving me a lot of info from Kodi and it's been great. 

Any input would be greatly appreciated.

Pages: [1]