INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is it possible to select radio stations within a playlist using core commands?  (Read 3663 times)

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

I have a play list of 30 Radio stations that I wish to select remotely (without Gizmo)

Is there a core command that offers this functionality? 

Fundamentally I am trying to create 30 Radio Preset buttons
Logged
The Future is Remote!

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!

You can control MC using MCWS.  Connect to it for documentation.
Logged
Matt Ashland, JRiver Media Center

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

You can control MC using MCWS.  Connect to it for documentation.

Welcome back Matt, it's nice to see the your Icon active again.

Unfortunately MCWS is not going to help as I need to send the command via Event Ghost or Girder.

Any other suggestions? Could I perhaps start a Radio station from an open URL core command or something along those lines?
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

You can't launch a program or script from Event Ghost or Girder?
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

You can't launch a program or script from Event Ghost or Girder?

Yes, of course but MCWS does not appear to offer an option to select from the playlist index.
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

You Playlists/List the list of playlists, and then enumerate over this list, finding the one(s) you want.  This gives you the names and IDs.  

Example:

http://localhost:52199/MCWS/v1/Playlists/List

...
<Item>
<Field Name="ID">239273183</Field>
<Field Name="Name">Car Radio</Field>
<Field Name="Path">Car Radio</Field>
<Field Name="Type">Group</Field>
</Item>
<Item>
<Field Name="ID">611608374</Field>
<Field Name="Name">01. Radio Button 1</Field>
<Field Name="Path">Car Radio\01. Radio Button 1</Field>
<Field Name="Type">Playlist</Field>
</Item>
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

If I understand you correctly, there is a need to have two way communications.  My remote software is only capable of sending commands in one direction to EventGhost/Girder.
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

I presume you want to send a command to play some car radio station preset, like #4.  You'd need to write a script that accepts as an argument the car radio preset number (or name) you want, and the script does all the rest.

I have Perl code (in pscriptor's MCUtils package and a scriptlet) that sets up the MCWS connection, and enumerates playlists.  It can be easily pulled out to create a standalone script which could be run.  It would require ActivePerl.  Or you could write your own code to connect to MCWS, enumerate the playlists, select the desired list ID and send the command to initiate playback.
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

Thanks for the insight, I believe I understand most of what you have explained.  Sadly I'm not sure my programming skills are up to the task.

Seems like a lot of work to have 30 radio station pre-sets and a significant limitation of JRiver but then I guess JRiver was never designed to be an Internet Tuner. 
Ramaradio has pre-sets and is easy to control but seems incapable of working directly with an ASIO driver connection or with JRiver in Live Mode  :'(
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

You can use the command line too:

   http://wiki.jriver.com/index.php/The_Command_Line

Look at the Playlists specification:

Quote
    A location within the Organization Tree: Example: TREEPATH=Playlists\Playlist1

    The TREEPATH=<location>\<item> specification is case-sensitive for <location> and <item> and the hierarchy separator is \ (backslash).
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

You can use the command line too:

   http://wiki.jriver.com/index.php/The_Command_Line

Look at the Playlists specification:


Unfortunately the playlist command line specification does not seem to offer the ability to choose playlist entries, it only allows the playlist to be chosen :(

For example, this does not work C:\>MC19.exe /Play TREEPATH=Playlists\Radio\BBC Radio 6
This works but will only play the first entry in the list C:\>MC19.exe /Play TREEPATH=Playlists\Radio\
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

You are missing double quotes around your playlist path, so MC sees this as three separate arguments "Playlists\Radio\BBC" and "Radio" and "6".
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

You are missing double quotes around your playlist path, so MC sees this as three separate arguments "Playlists\Radio\BBC" and "Radio" and "6".

This was my first attempt and since it did nothing at all, I thought perhaps the double quotes was an error.  Either way it does not work for me :(

C:\Windows\System32>MC19.exe /Play TREEPATH="Playlists\Radio\BBC Radio 6"

Thanks for your help anyway. It would have been great if it had worked.
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

You're a bit of a naysayer, eh?

It works fine.  I just used it:

   mc19.exe /Play TREEPATH="Playlists\Car Radio\01. Radio Button 1"
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14401
  • I won! I won!

FYI - I'm note sure if this is what you want, but I exported my Radio Stations as an MPL Playlist (then edited the MPL down to just one).  When I launch the MPL it plays the content in MC just fine. 

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="Radio and TV Stations">
<Item>
<Field Name="Filename">http://icecast.arn.com.au/1017.aac</Field>
<Field Name="Name">WSFM 1017</Field>
<Field Name="Genre">Radio and TV</Field>
<Field Name="Image File">C:\Users\Nathan\AppData\Roaming\J River\Media Center 19\Cover Art\Files\1669501.jpg</Field>
<Field Name="Media Type">Audio</Field>
<Field Name="Bookmark">1135499</Field>
<Field Name="Date Imported">1399707877</Field>
<Field Name="Last Played">1400913785</Field>
<Field Name="Number Plays">27</Field>
<Field Name="File Type">aac</Field>
<Field Name="Web Media URL">http://icecast.arn.com.au/1017.aac</Field>
</Item>

</MPL>
Logged
JRiver CEO Elect

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

You're a bit of a naysayer, eh?

It works fine.  I just used it:

   mc19.exe /Play TREEPATH="Playlists\Car Radio\01. Radio Button 1"

naysayer, eh  :) I'm not sure my XYL would agree with you  ;D

Sorry I really did try your suggestion in numerous arrangements (including the one you posted) alas without success  :(

C:\Windows\System32>mc19.exe /Play TREEPATH="Playlists\Radio\04. BBC Radio 4"

This command always plays the first station in the list.
Clearly I am still missing something
Logged
The Future is Remote!

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

FYI - I'm note sure if this is what you want, but I exported my Radio Stations as an MPL Playlist (then edited the MPL down to just one).  When I launch the MPL it plays the content in MC just fine.  

Thanks for your idea, I have only completed a couple of stations but everything looks good.  This is my cut down version of your idea

<MPL Version="2.0" Title="BBC Radio Stations">
<Item>
<Field Name="Filename">mms://wmlive-acl.bbc.co.uk/wms/bbc_ami/radio3/radio3_bb_live_eq1_sl0</Field>
</Item>
</MPL>

Your idea has the added benefit that the stations do not even need to be in a playlist :o :)

I am sure others may wish to have presets to either radio stations or tracks of some sort or another. Just a suggestion but perhaps this should be considered for adding to the wiki site information.

Thanks everyone!
Chris
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

Have we been having a terminology issue?  It sounds to me now like you had a single playlist, and were trying to select entry N in that playlist.  I've been presuming you were trying to select playlist number N.

Of course MC will only play the first entry in a Playlist N when that entry is an infinitely streaming item that never ends.

You can pass streaming URLs to the command line:

   mc19.exe /Play "http://...."

Or the URL can be in a simple m3u text file and you can use:

   mc19.exe /Play "C:\path\to\playlist.m3u"
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

It does seem that we have had some confusion but my first post and title of the thread refer to selecting radio stations via presets!

Never mind, I enjoyed the ride ;D

Apologies if I misled you in some way.
Logged
The Future is Remote!

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

Yup.  There is MC's Car Radio, which uses the term Presets, so wanting to select Presets implied Car Radio.  And there was also the mention of Core commands, which would imply MCC commands.

You can still use MCWS to enumerate over entries within a given playlist, select one, and have it play.  Ask if you need this.

Anyway, good to know you have what you need.
Logged
The opinions I express represent my own folly.

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

Initially I was looking for a core command that could choose an entry within a playlist.  The final solution is so much better.
Logged
The Future is Remote!

Beamer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 346
  • True wisdom is in knowing you know nothing

Yup.  There is MC's Car Radio, which uses the term Presets, so wanting to select Presets implied Car Radio.  And there was also the mention of Core commands, which would imply MCC commands.

You can still use MCWS to enumerate over entries within a given playlist, select one, and have it play.  Ask if you need this.

Anyway, good to know you have what you need.

Again I'm sorry for the confusion.
Just thought I would let you know that I have been testing your example "mc19.exe /Play "http://...." and it also works great and is a little easier to accommodate within Event Ghost, it also for some reason seems a little faster in changing stations versus .pls files.  Its sure nice to have choices though  ;)
Logged
The Future is Remote!
Pages: [1]   Go Up