maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   MediaBox on n810: Manually add internet radio/streams? (https://talk.maemo.org/showthread.php?t=57761)

f1lter 2010-07-04 19:06

MediaBox on n810: Manually add internet radio/streams?
 
Does anyone know how to manually add streaming media, i.e., internet radio URLs to the latest version of MediaBox?

I realize there's a Shoutcast directory, but I'd prefer to just add URLs manually to a playlist.

I tried manually creating a playlist with a URL starting with "iradio-stations", but no dice.

pycage 2010-07-05 06:49

Re: MediaBox on n810: Manually add internet radio/streams?
 
This sounds like a good feature for the next version.
Currently it's not supported.

f1lter 2010-07-05 17:42

Re: MediaBox on n810: Manually add internet radio/streams?
 
Thanks for the reply!

So just to clarify, there isn't a bookmark file or anything I can edit to add streams without using Shoutcast, correct?

pycage 2010-07-05 18:43

Re: MediaBox on n810: Manually add internet radio/streams?
 
Quote:

Originally Posted by f1lter (Post 741451)
Thanks for the reply!

So just to clarify, there isn't a bookmark file or anything I can edit to add streams without using Shoutcast, correct?

Well, it's not impossible. But it's not easy either. You could fake a SHOUTcast bookmark entry in /home/user/.mediabox/bookmarks

For reference, this is how the path is built:
Code:

    def __encode_station(self, name, bitrate, mimetype, resource, genre):
   
        s = "\t\t\t".join([name, bitrate, mimetype, resource, genre])
        return urlquote.quote(s, "")


    def __decode_station(self, s):
   
        data = urlquote.unquote(s)
        name, bitrate, mimetype, resource, genre = data.split("\t\t\t")
        return (name, bitrate, mimetype, resource, genre)

Let's say you want to have http://my.station.com/music.pls.

Name, bitrate, genre don't matter. MIME type could be "audio/mpeg".
Resource is the URL.
The fields are separated by 3 Tabulators, so you have something like:
Code:

MyStation\t\t\t128\t\t\taudio/mpeg\t\t\thttp://my.station.com/music.pls\t\t\tGENRE
This whole stuff gets URL-encoded (replacing URL-reserved characters by their hex code), so you'll get

Code:

MyStation%09%09%09128%09%09%09audio%2Fmpeg%09%09%09http%3A%2F%2Fmy.station.com%2Fmusic.pls%09%09%09GENRE
Add a prefix "iradio-shoutcast:///A/" and you have the complete path for a fake SHOUTcast station on the shelf:

Code:

iradio-shoutcast:///A/MyStation%09%09%09128%09%09%09audio%2Fmpeg%09%09%09http%3A%2F%2Fmy.station.com%2Fmusic.pls%09%09%09GENRE
However, the path encoding may change.


All times are GMT. The time now is 14:10.

vBulletin® Version 3.8.8