View unanswered posts | View active topics It is currently Thu May 23, 2013 1:36 pm



Reply to topic  [ 4 posts ] 
 RSS Random Music 
Author Message

Joined: Fri Mar 04, 2011 7:17 am
Posts: 10
Location: France
Post RSS Random Music
This is an RSS script to listen to your music randomly on your media player.
Image
Here is a page dedicated to the subject in French
http://geekyhmb.fr.cr/content/random-music-rss
Translated
http://translate.google.fr/translate?hl=fr&sl=fr&tl=en&u=http%3A%2F%2Fgeekyhmb.fr.cr%2Fcontent%2Frandom-music-rss

The script is here http://www.mediafire.com/?tknfdcyoyxi50 with this name IMS_GeekyHMB_RMusic_vxx.zip
The light version is without MP3 files (licences Creative Commons http://creativecommons.org/)

I do not know if the AC-RYAN have a setting in the setup for IMS scripts: USB, HDD, System

Otherwise, I think it will be easy to adapt.

Here are the problems I encountered for which I need help:
- I was not able to read the environment variable $RANDOM with the command getenv ("RANDOM"); so I created my own algorithm. But is there a way to read $RANDOM ?
- When a character "&" is in the filename, the command playItemURL (); does not work ...
- I can not make a RSS script that lets you select a folder and returns the name of this folder to the main script.

thank you for your help
Regards

_________________
http://geekyhmb.fr.cr


Wed Jul 20, 2011 11:37 am
Profile WWW

Joined: Sat May 08, 2010 5:07 am
Posts: 335
Post Re: RSS Random Music
Nice work zozodesbois, I haven't tried it yet (I am not home) but looks like it would work fine on the POHD or any other similar player.

As far as some of your problems here some of my thoughts for whatever it's worth:

I think that the "getEnv" availlable in the rss feed it only valid within the context of the IMS feed and unlike c++, php, python etc... does not refer to an actual system variable and in most cases must be declare previously before it can be used. I think this is more or less a way to pass variable from one feed to another. I've seen a lot of example where it was used to fetch a password; something like:

if password = "NULL" then ..... launch another RSS feed to allow user to enter password. Password is then store in the new rss feed with "setEnv" and then control is return to the previous rss feed. From that point on all rss feed within that session can call up the password with the "getEnv"

I am also not sure in case I am wrong with my first assumption that random is available on "sh" I know it is on "bash" but not sure in "sh". I am not home so I can not check to see if environment variable exist on my player.

Your second issue is pretty hard to fix since the "&" is a special character when dealing with rss feeds. You could try to catch that after the creation of you xml file; you could use "sed" to search and substitute any encounter of "&" in the music file name and replace it with "&". I believe this might resolve your issue with regards to the "&" characters in the filename ..... maybe.

You third issue could be resolve with the "setEnv" , "getEnv" but you probably thought of that already when you read my comments about your first problem. :D You could also write the path to a file and then read that file from the main script; I guess it depends when the call to the other rss script was made. You could also use the following:

rss = "rss you want to go to";
path = doModalRss(rss);

In the "rss you want to go to" you will need something like:

if ("enter" == userInput) {
path = "whatever path you selected";
setReturnString("path");
postMessage("return");
handled = "true";
}

Anyhow hopefully this will help you resolve your issues; if you are wandering what I am doing lately ...well let's just say as little as possible and enjoying the summer.

A bientot mon ami.


Wed Jul 20, 2011 8:25 pm
Profile

Joined: Fri Mar 04, 2011 7:17 am
Posts: 10
Location: France
Post Re: RSS Random Music
Merci the Summer man ! :D

about $ RANDOM
You're right, the variables that are created with setEnv(); are not seen in shell with "set".

about "&"
Thank you, it's a good idea to put "&amp" with sed.
But is it possible to substitute a carractère with RSS scripts? (like substr...)

about "folders"
I intend to use doModalRSS (), but my problem is more to reveal the names of files in a RSS script. I would want to browse folders, I want to show only folders names to select one.
The idea I have is for your Jukebox or the Random Music, the first installation will be done more by telnet, but with this script on TV.

Regards.
Zozodesbois

_________________
http://geekyhmb.fr.cr


Thu Jul 21, 2011 12:37 pm
Profile WWW

Joined: Sat May 08, 2010 5:07 am
Posts: 335
Post Re: RSS Random Music
zozodesbois wrote:
about "&"
Thank you, it's a good idea to put "&amp" with sed.
But is it possible to substitute a carractère with RSS scripts? (like substr...)


Not that I know of but it does not mean it does not exist it just mean that I don't know how :? .

zozodesbois wrote:
about "folders"
I intend to use doModalRSS (), but my problem is more to reveal the names of files in a RSS script. I would want to browse folders, I want to show only folders names to select one.
The idea I have is for your Jukebox or the Random Music, the first installation will be done more by telnet, but with this script on TV.


Let me see if I got this right; you would like to have a file browser call up from an rss feed and in that rss file browser you would like to be able to select a file and have that file reported back to the main rss feed that call it. Do I have this right?

Cheers !!!


Thu Jul 21, 2011 1:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by: phpBB | Innitial forum Design by: STSoftware | Modified by: AC Ryan.