Active Topics

 



Notices


Reply
Thread Tools
Posts: 11 | Thanked: 8 times | Joined on Jan 2010
#1
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's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#2
This sounds like a good feature for the next version.
Currently it's not supported.
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 
Posts: 11 | Thanked: 8 times | Joined on Jan 2010
#3
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's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#4
Originally Posted by f1lter View Post
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.
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:52.