Author Topic: Announcing tracks in radio like manner...  (Read 15285 times)

0 Members and 1 Guest are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #30 on: May 06, 2013, 12:28:58 PM »
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.

Code: [Select]
<?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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Announcing tracks in radio like manner...
« Reply #31 on: May 07, 2013, 01:26:57 AM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Announcing tracks in radio like manner...
« Reply #32 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....

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #33 on: May 07, 2013, 07:59:30 AM »
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.
« Last Edit: May 07, 2013, 08:02:47 AM by jitterjames »

Snodric

  • $upporter
  • Jr. Member
  • *****
  • Posts: 23
  • Karma: 0
    • View Profile
Re: Announcing tracks in radio like manner...
« Reply #34 on: May 07, 2013, 02:44:03 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #35 on: May 07, 2013, 03:28:16 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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Announcing tracks in radio like manner...
« Reply #36 on: May 07, 2013, 09:41:49 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #37 on: May 07, 2013, 09:45:15 PM »
Yes, it's an XBMC bug.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Announcing tracks in radio like manner...
« Reply #38 on: May 22, 2013, 11:49:19 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #39 on: May 23, 2013, 08:22:59 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Announcing tracks in radio like manner...
« Reply #40 on: May 24, 2013, 06:54:43 PM »
Try updating the xJson plugin with these files