Announcing tracks in radio like manner...

Started by thesystemera, May 28, 2012, 11:08:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jitterjames

assuming you've got VC set up correctly to work with Frodo in general you should be able to just drop this into your tree and it will announce songs.

<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="XJSON announce songs" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="883" name="XJson.Connect" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Connect</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>focused.XBMC</event>
  </command>
  <command id="507" name="OnPlay Song" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Stop</cmdType>
      <cmdString>{LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Player.GetItem&amp;&amp;"playerid":0, "properties": ["title", "album", "artist", "rating","playcount","genre"]</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.ParseTokens</cmdType>
      <cmdString>Now Playing : {item.title}, by Artist {item.artist[[ &amp; ]]}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>{LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
</commandGroup>

thesystemera

Birilliant!  Yes it's running really well.  I've been playing with the other JSON commands, quite a few of them, some good ones.  It was just your origional script with it's logicgate was hurting my brain.  Thanks. 

Will post a video in the next few days of what I'm doing.. You'r going to love it, its getting to the point that it's really similar to the short two minute video you might have seen :D

thesystemera

Thanks for that, I'm wanting to keep it more to the original specifications of having it announce the "last track" and the "current track" after every few songs.  Also with the XJSON.connect monitoring of notifications, is that specific to a change in song or any notifications. 

I'll read in to that..  Thanks....

jitterjames

#33
All of the JSON notifications, with the exception of playlist changes.  I turned those off because every time I queued a playlist it would create a flood of events.  It is really only necessary to connect once, so it doesn't necessarily need to be triggered by a focus event.

Just use XBMC and watch the events to see.

Snodric

Quote from: thesystemera on May 07, 2013, 01:38:29 AM
Thanks for that, I'm wanting to keep it more to the original specifications of having it announce the "last track" and the "current track" after every few songs.  Also with the XJSON.connect monitoring of notifications, is that specific to a change in song or any notifications. 

I'll read in to that..  Thanks....

Looking forward to seeing the video! Please show us how to put the code into VoxCommando!

jitterjames

Quote from: Snodric on May 07, 2013, 02:44:03 PM
Please show us how to put the code into VoxCommando!

Copy the code, open the command tree in VoxCommando (click "Edit") and paste it into your command tree.  Save.

thesystemera

James any idea why it would be doubling up, I sweat this wasn't always the behaviour..  Very strange. 

Just to be clear, when I song plays, it just repeats itself consecutively. 

jitterjames


thesystemera

Hey James, been off the radar for a bit, just been cramming my final dissertation. 

Still having issues's with this XBMC repeat issue.  Tryed using 'Speak' instead of 'SpeakSync' but with no luck, still getting a double up. 

Any ideas on how to resolve this.  What was the timer method you used last time to resolve this..  That could be quite effective. 

I'm wanted to produce this video, but this one thing is holding me back.  GRRR.  Thanks again for your time. 

jitterjames

Did you also use TTS.stop at the beginning of the macro?

I can look into another solution but I may be off the grid for a while too.  We're in the process of changing ISPs.

jitterjames

Try updating the xJson plugin with these files