Skip to content
PeteManchester edited this page Sep 30, 2015 · 14 revisions

The MediaPlayer provides a templace of Radio Stations, these Stations can be configured by editing the

RadioList.json

The format of the file is:

{
    "head": {
        "title": "Favorites",
        "status": "200"
    },
    "body": [
        {
            "element": "outline",
            "text": "Shows (2)",
            "key": "shows",
            "children": [

            ]
        },
        {
            "element": "outline",
            "text": "Stations (33)",
            "key": "stations",
            "children": [
                {
                    "element": "outline",
                    "type": "audio",
                    "text": "96.2 | The Revolution (Rock)",
                    "URL": "http://opml.radiotime.com/Tune.ashx?id=s45508&partnerId=yvcOjvJP&username=petehoyle",                   
                    "image": "http://d1i6vahw24eb07.cloudfront.net/s45508q.png",
                    "item": "station",
                    "guide_id": "s45508",
                    "icy_reverse": true
                },
                {
                    "element": "outline",
                    "type": "audio",
                    "text": "1197 | Absolute Radio (Adult Contemporary)",
                    "URL": "http://opml.radiotime.com/Tune.ashx?id=s46593&partnerId=yvcOjvJP&username=petehoyle",                  
                    "image": "http://d1i6vahw24eb07.cloudfront.net/s16679q.png",
                    "item": "station",
                    "guide_id": "s46593"
                },
                {
                    "element": "outline",
                    "type": "audio",
                    "text": "102.0 | Capital Manchester (Top 40/Pop)",
                    "URL": "http://opml.radiotime.com/Tune.ashx?id=s18587&partnerId=yvcOjvJP&username=petehoyle",                    
                    "image": "http://d1i6vahw24eb07.cloudfront.net/s18587q.png",
                    "item": "station",
                    "guide_id": "s18587"
                }
            ]
        }
    ]
}

Where:

Option Description
element Should always be 'audio'
type Is normally 'audio'
text Is the name displayed in the Control Point.
URL Is the url of the radio feed.
image Is optional and is the url to an image file.
item Is normally 'station'
guide_id The letters are stripped and then this should be unique numeric id of the station,
icy_reverse Is optional and allows you to reverse the title and artist information provided by ICY
keep_url Optional, keep the URL of the RadioList.json rather than the feed from TuneIn

You can delete Channels or add your own Channels.

The format is very similar to the format used by TuneIn.com.

To find stations to add you can use the url

http://opml.radiotime.com/Browse.ashx?render=json

for example to start looking for Local stations you can use

http://opml.radiotime.com/Browse.ashx?c=local&render=json

Which will give you a list of local stations

For Manchester you would then get the url

http://opml.radiotime.com/Browse.ashx?id=r100781&render=json

And then you get as list of stations, you can then get the parts you need and add them to your RadioList.xml There are more attributes than are needed but MediaPlayer will ignore those.

{ "element" : "outline", 
"type" : "audio", 
"text" : "2BR 99.8 (Top 40/Pop)", 
"URL" : "http://opml.radiotime.com/Tune.ashx?id=s45533", 
"bitrate" : "64", 
"reliability" : "98", 
"guide_id" : "s45533", 
"subtext" : "Music Fun Life", 
"genre_id" : "g61", 
"formats" : "wma,mp3", 
"item" : "station", 
"image" : "http://d1i6vahw24eb07.cloudfront.net/s45533q.png", 
"now_playing_id" : "s45533", 
"preset_id" : "s45533" }

A sample RadioList is also provided in RadioList.json.sample, this has examples of a custom TuneIn station, some 'Shows' and a lot of local Manchester stations.

It would be much easier for MediaPlayer to just be able to read your favourites you have configured at TuneIn.com automatically and indeed the MediaPlayer could do this, but unfortunately I am not able to obtain a PartnerId from TuneIn.com.

If you can find a partner id you could use the following URL to get the list of your favorite stations.

http://opml.radiotime.com/Browse.ashx?&c=presets&options=recurse:tuneShows&partnerid=[ID]&username=[USERNAME]&render=json

You can validate your RadioList.json at http://jsonlint.com/