Author Topic: XBMC radio add-on?  (Read 13655 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
XBMC radio add-on?
« on: October 10, 2013, 11:20:22 AM »
Is anyone here using the Radio music plugin for XBMC? (http://forum.xbmc.org/showthread.php?tid=119362)

Apparently, the plugin gives easy access to any of the radio broadcasts powered by the websites http://www.radio.de (German), http://www.rad.io (English), and http://www.radio.fr (French).

If you are using it, have you made any custom VC commands for it?
« Last Edit: October 10, 2013, 04:23:53 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #1 on: October 10, 2013, 04:17:35 PM »
Here is a command to select a random station by genre using the XBMC addon "radio".
http://wiki.xbmc.org/index.php?title=Add-on:Radio

You need to put the payloadXML file in your payloads folder and then modify it to include the genres you want to use.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="435" name="radio test 2" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Btn.KB</cmdType>
    <cmdString>stop</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.SpeakSync</cmdType>
    <cmdString>Please wait while I search for {1} radio stations</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>GUI.ActivateWindow&amp;&amp;"window": "music", "parameters": [ "plugin://plugin.audio.radio_de/stations/genre/{1}/" ]</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <cmdString>import random</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <cmdString>result=random.randint(1,500)</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <cmdString>myrand&amp;&amp;{LastResult}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <cmdString>random number: {Var.myrand}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>XBMC.GetInfoLabels&amp;&amp;"labels": ["Container(id).ListItem({Var.myrand}).Label"]</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <cmdString>:."(.*)"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <cmdString>Opening Stream: {Match.1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <cmdString>Opening Stream: {Match.1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>XBMC.GetInfoLabels&amp;&amp;"labels": ["Container(id).ListItem({Var.myrand}).FileName"]</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <cmdString>:."(.*)"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <cmdString>item id: {Match.1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ExecBuiltin</cmdType>
    <cmdString>PlayMedia(plugin://plugin.audio.radio_de/station/{Match.1})</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <cmdString>4000</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>GUI.SetFullscreen&amp;&amp;"fullscreen":"toggle"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>pick some</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\RadioGenres.xml</payloadFromXML>
  <phrase>radio for me</phrase>
</command>
« Last Edit: October 10, 2013, 04:40:56 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #2 on: October 10, 2013, 04:57:11 PM »
Here is a comprehensive list of genres as generated from

http://www.rad.io/info/menu/valuesofcategory?category=_genre

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #3 on: October 10, 2013, 05:02:13 PM »
and if you use the plugin in German mode, I think the command will still work, you just need to use slightly different Genres as found here:

http://www.radio.de/info/menu/valuesofcategory?category=_genre

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC radio add-on?
« Reply #4 on: October 11, 2013, 03:03:50 AM »
First - big thanks to nime and James, for this really useful command (and also for the hint to this radio add-on)
It works perfect, I've insert at the end of the command a "VC.triggerEvent" action, which trigger a "what song is this" command.

One question: how can select a radio station directly in the add-on? Like "play radio station 'HitradioFFH' "

GUI.ActivateWindow&amp;&amp;"window": "music", "parameters": [ "plugin://plugin.audio.radio_de/stations/genre/{1}/" ]</cmdString>

Thanks for help
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #5 on: October 11, 2013, 11:08:46 AM »
You can do this with a payload xml.  The command is actually much simpler.

I am attaching a payloadXML with ALL the german radio stations that I copied from the rad.io website.  You will probably want to edit the list down to just the stations you want to use, and then maybe edit the phrases to make them easier to say, and maybe add alias phrases for some of them using commas.

I don't know how stable the radio station IDs are on this site.  If the IDs change then you will need to update your payloadXML.

It is also possible to get the actual streams from this site if you want to play the streams directly from something other than XBMC.  For example this link will give you details for the station ID: 8207 including the url of the stream which you can use in media monkey, itunes etc. or even play directly using VoxCommando's Sound.Playstream action.
http://www.rad.io/info/broadcast/getbroadcastembedded?broadcast=8207

By the way this site does something weird that prevents us from using the scrape command.  ???  To make the payloadXML I just used my web browser, copied the json to notepad++ and then used find and replace to get the columns for ID and Name which I then pasted into the VC payload editor. Easy!  :biglaugh

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="449" name="play radio station {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.ExecBuiltin</cmdType>
    <cmdString>PlayMedia(plugin://plugin.audio.radio_de/station/{1})</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <cmdString>4000</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>GUI.SetFullscreen&amp;&amp;"fullscreen":"toggle"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>play radio station</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\rad_io_station_ids.xml</payloadFromXML>
</command>
« Last Edit: October 11, 2013, 11:10:56 AM by jitterjames »

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: XBMC radio add-on?
« Reply #6 on: October 11, 2013, 11:31:55 AM »
Hi
i have a problem.On my HTPC the Command work but if i change the xbmc client (Rasbmc (XJson.SetConnection)) it dosnt open the stream.Radioaddon is aktiv.

I want to create a radio.pls , and the other Clients can open it with the normal XBMC Player.Hope you understand  what i want :biglaugh

can i scrape the the url after choose a radio station?
« Last Edit: October 11, 2013, 12:49:58 PM by Tecni »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XBMC radio add-on?
« Reply #7 on: October 11, 2013, 01:23:07 PM »
It is also possible to get the actual streams from this site if you want to play the streams directly from something other than XBMC.  For example this link will give you details for the station ID: 8207 including the url of the stream which you can use in media monkey, itunes etc. or even play directly using VoxCommando's Sound.Playstream action.
http://www.rad.io/info/broadcast/getbroadcastembedded?broadcast=8207

As jitterjames says, you can get the stream URLs for individual radio stations manually. (For the above example, the streamUrl is http://stream.laut.fm/soundmania).

So, if you know the radio stations you want to stream, you could look up each one and then create a payloadXML where the value is the streamUrl and the phrase is the name of the radio station. Unfortunately, radio.de does not allow us to scrape this information automatically.

If you also want to play a random station from this list of streams, this should also be possible once the list has been defined.

I assume you know how to play a media stream in the regular XBMC player?
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #8 on: October 11, 2013, 02:15:16 PM »
i have a problem.On my HTPC the Command work but if i change the xbmc client (Rasbmc (XJson.SetConnection)) it dosnt open the stream.Radioaddon is aktiv.

I don't know what you mean by "the command", but if it works on your htpc then you must have done something wrong setting up the rasbmc machine. Or maybe the raspbmx does not support that addon? Sorry, we can't help because you have provided no information other than "it doesn't work".
« Last Edit: October 11, 2013, 03:27:45 PM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC radio add-on?
« Reply #9 on: October 12, 2013, 08:20:12 AM »

Quote
You can do this with a payload xml.  The command is actually much simpler.

Thanks James  :hugs
***********  get excited and make things  **********

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: XBMC radio add-on?
« Reply #10 on: October 12, 2013, 10:51:35 AM »
Schade das es nicht möglich ist die URL auszulesen.Also bleibt mir nur die Payload Methode über.
Ich benutze zurzeit das Script von Jitterhames http://voxcommando.com/forum/index.php?topic=1140.0 (bischen abgeändert)

Wie geh ich vor?
XML von jedem Genre erstellen und manuell die Streams einfügen?

Hier mal das Script

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Radio" enabled="False" prefix="" priority="0" requiredProcess="" description="">
  <command id="837" name="playRadioMatch" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="\\HTPC-PC\Users\Public\Music">
    <action>
      <cmdType>Scrape</cmdType>
      <cmdString>{Match.1}}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Write</cmdType>
      <cmdString>C:\Users\Public\Music\radio.pls&amp;&amp;{LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <cmdString>Player.Open&amp;&amp;"item":{"file":"smb:\\HTPC-PC\Users\Public\Music\radio.pls"}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.OpenFile</cmdType>
      <cmdString>radio.pls</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <cmdString>File.=(.*)</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayStream</cmdType>
      <cmdString>{Match.1}</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <cmdString>Title.=\(.*?\)(.*)</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>{Match.1} wird abgespielt</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <cmdString>{Match.1} wird abgespielt</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>starte radio</phrase>
    <event>playRadioMatch</event>
  </command>
  <command id="798" name="shoutcast genre" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Stop</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString>suche Radiosender {1}</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <cmdString>http://www.shoutcast.com/radio/{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <cmdString>href="(.*?)".*?class="playbutton</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <cmdString>import random</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <cmdString>result = random.randint(1,{#M})</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <cmdString> {#M} Radiosender gefunden, spiele nummer {LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <cmdString>playRadioMatch&amp;amp;&amp;amp;{LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>shoutcast, inizialisiere radiowiedergabe</phrase>
    <phrase>genre, station</phrase>
    <payloadList>Alternative,Blues,Classical,Country,Decades,Easy Listening,Electronic,Metal,Oldies,New Age,Pop,Public Radio,Rap,Reggae,Rock,</payloadList>
  </command>
  <command id="799" name="stop stream" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Stop</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SendKeys</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>stope radiowiedergabe</phrase>
  </command>
  <command id="833" name="stop stream schlafzimmer küche" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Stop</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Btn.KB</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>stope radiowiedergabe  schlafzimmer,stope radiowiedergabe küche</phrase>
  </command>
  <command id="839" name="Alle räume" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <cmdString>{Match.1}}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.Write</cmdType>
      <cmdString>C:\Users\Public\Music\radio.pls&amp;&amp;{LastResult}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.33&amp;&amp;80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <cmdString>Player.Open&amp;&amp;"item":{"file":"smb:\\HTPC-PC\Users\Public\Music\radio.pls"}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.31&amp;&amp;80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <cmdString>Player.Open&amp;&amp;"item":{"file":"smb:\\HTPC-PC\Users\Public\Music\radio.pls"}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.92&amp;&amp;8080&amp;&amp;xbmc&amp;&amp;mario11111</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw/</cmdType>
      <cmdString>Player.Open&amp;&amp;"item":{"file":"smb:\\HTPC-PC\Users\Public\Music\radio.pls"}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>starte radiowiedergabe in allen räume</phrase>
    <event>playRadioMatch</event>
  </command>
  <command id="851" name="Alle räume stop" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.33&amp;&amp;80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Btn.KB</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.31&amp;&amp;80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Btn.KB</cmdType>
      <cmdString>x</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.178.92&amp;&amp;8080&amp;&amp;xbmc&amp;&amp;mario11111</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SendKeys</cmdType>
      <cmdString>x</cmdString>                                                   If i use XJson.Btn.KB on my HTPC XBMC FREEZES
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>stope radiowiedergabe in allen räumen</phrase>
  </command>
</commandGroup>



Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC radio add-on?
« Reply #11 on: October 12, 2013, 11:05:47 AM »
Ja genau, geht wohl nicht anders. Schau mir das nachher mal an.
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XBMC radio add-on?
« Reply #12 on: October 12, 2013, 11:52:04 AM »
Ich benutze zurzeit das Script von Jitterhames http://voxcommando.com/forum/index.php?topic=1140.0 (bischen abgeändert)

I don't know if this is the reason for all of your difficulties, but I can see several errors in the Shoutcast code. It looks like the code was not copied correctly. This may have been causing your initial problems.

The main problems are:

{Match.1}} should be {Match.{1}} in several places. [See the original code]

The "Shoutcast genre" command's VC.TriggerEvent action is probably not passing the parameter {LastResult} properly.

Your code says:

    <cmdString>playRadioMatch&amp;amp;&amp;amp;{LastResult}</cmdString>

But {LastResult} should be passed as the payload (i.e. the second parameter), not within the first parameter of the command string as it is currently in your code. In your code, VoxCommando is creating an event named "playRadioMatch&amp;amp;&amp;amp;[Random number]". In other words, it is not creating the event named "playRadioMatch" that you need to trigger the next command.

The code should be:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="817" name="shoutcast genre" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.Standby</cmdType>
    <cmdString />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Stop</cmdType>
    <cmdString />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <cmdString>suche Radiosender {1}</cmdString>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>Scrape</cmdType>
    <cmdString>http://www.shoutcast.com/radio/{1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <cmdString>href="(.*?)".*?class="playbutton</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <cmdString>import random</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <cmdString>result = random.randint(1,{#M})</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <cmdString> {#M} Radiosender gefunden, spiele nummer {LastResult}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
 action>
    <cmdType>VC.TriggerEvent</cmdType>
    <cmdString>playRadioMatch&amp;&amp;{LastResult}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Standby</cmdType>
    <cmdString />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>shoutcast, inizialisiere radiowiedergabe</phrase>
  <phrase>genre, station</phrase>
  <payloadList>Alternative,Blues,Classical,Country,Decades,Easy Listening,Electronic,Metal,Oldies,New Age,Pop,Public Radio,Rap,Reggae,Rock,</payloadList>
</command>


The problem with your stream not playing is because of the VC.TriggerEvent error. If you copy the above and paste it into your tree, replacing your current 'shoutcast genre' command, that should fix the streaming problem for shoutcast.

With regard to XBMC-related issues, I will leave that to others here. I don't use XBMC. :)
« Last Edit: October 12, 2013, 12:12:56 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Tecni

  • Jr. Member
  • **
  • Posts: 18
  • Karma: 0
    • View Profile
Re: XBMC radio add-on?
« Reply #13 on: October 12, 2013, 01:26:54 PM »
I have corrected it .Thanks



jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC radio add-on?
« Reply #14 on: October 12, 2013, 02:23:51 PM »
I don't understand why you have switched back to shoutcast, rather than using the commands for the XBMC radio plug-in.

What is your ultimate goal?  Forget about the commands for now.  What do you want to be able to do?
« Last Edit: October 12, 2013, 02:47:54 PM by jitterjames »