Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

SHOUTcast Radio Directory: Import 63 000 streams #34

Open
davidhedlund opened this issue Sep 21, 2017 · 9 comments
Open

SHOUTcast Radio Directory: Import 63 000 streams #34

davidhedlund opened this issue Sep 21, 2017 · 9 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Sep 21, 2017

The SHOUTcast Radio Directory can be downloaded and used by developers who wish to use it, and there are no non-free restrictions.

We should of course give credit to SHOUTcast on the main page of radio-browser.info if they give us access to the API.

Interesting links

@davidhedlund
Copy link
Author

#31

@davidhedlund
Copy link
Author

davidhedlund commented Sep 21, 2017

https://www.shoutcast.com/Developer says

If you would like to become a SHOUTcast API Partner, please send us an email with details about your company and your proposed application. We'll get back to you.

I filed a request with this text:

We are trying to import your streams to radio-browser.info - #34

Please read http://www.radio-browser.info/gui/#/ for information about the growing project.

@davidhedlund davidhedlund changed the title Import the SHOUTcast Radio Directory SHOUTcast Radio Directory: Import 6300 streams Nov 4, 2017
@davidhedlund davidhedlund changed the title SHOUTcast Radio Directory: Import 6300 streams SHOUTcast Radio Directory: Import 63 000 streams Nov 4, 2017
@davidhedlund
Copy link
Author

davidhedlund commented Nov 4, 2017

Well, I got a API key a while ago.

Example how to use it from http://wiki.shoutcast.com/wiki/SHOUTcast_Radio_Directory_API#Get_Top_500_Stations

http://api.shoutcast.com/legacy/Top500?k=[Your Dev ID]

The XML was obfuscated so I had to pretty print it:

xmllint Top500.xml --format

<stationlist>
<?xml version="1.0" encoding="UTF-8"?>
<stationlist>
  <tunein base="/sbin/tunein-station.pls" base-m3u="/sbin/tunein-station.m3u" base-xspf="/sbin/tunein-station.xspf"/>
  <station name="COOLfahrenheit 93 - (7)" mt="audio/mpeg" id="1721052" br="64" genre="Easy Listening" genre2="Pop" logo="http://i.radionomy.com/document/radios/a/a265/a2654f5f-669e-4b9e-ac13-962971886ad2.jpg" ct="Instinct - -B)...+1'C" lc="7202"/>
  <station name="COOLfahrenheit 93 -- (6)" mt="audio/mpeg" id="1634844" br="64" genre="Easy Listening" genre2="Pop" logo="http://i.radionomy.com/document/radios/7/7c48/7c48c133-a1ee-42e6-97fa-6420420e8cad.jpg" ct="Instinct - -B)...+1'C" lc="5708"/>
  <station name="Dance Wave Retro!" mt="audio/mpeg" id="1057402" br="128" genre="International" lc="5413"/>
...
</stationlist>

As you can see, there are no playlists in the XML. I have asked SHOUTcast to include them. I'll get back on this later.

@dr0biwan
Copy link

Dunno if this is still relevant or not but you're given all of the information in the SC API responses to be able to generate the SC playlist url as needed.

You assume 'shoutcast.com' & then append the appropriate values from the 'tunein' part of the response (depending on the playlist type you want to use) & then just append the 'id' in the station entry. Though you can probably just assume a hard-coded string for the playlist without using the 'tunein' part & just append the 'id'.

@davidhedlund
Copy link
Author

@dr0biwan Can you please give an example for name="Dance Wave Retro!"?

@dr0biwan
Copy link

dr0biwan commented Apr 30, 2018

For that example (if going for the m3u version), then you'd have "shoutcast.com/sbin/tunein-station.m3u?id=1057402" as the playlist which then the client / tooling parses to get to the actual stream url(s) (since the directory listing can depending on the station's setup either be made up of 1 server or a cluster of servers).

I should probably note that I used to work maintaining that API & other SC aspects for a few years though whoever is left in support should have been able to give you this information about the playlists (even if it meant pointing you to the wiki docs).

@davidhedlund
Copy link
Author

For that example (if going for the m3u version), then you'd have "shoutcast.com/sbin/tunein-station.m3u?id=1057402" as the playlist which then the client / tooling parses to get to the actual stream url(s) (since the directory can depending on the station's setup either be made up of 1 server or a cluster of servers).

Thanks. I just needed to add "http://yp." at the beginning of the URL like this to make it work:
http://yp.shoutcast.com/sbin/tunein-station.pls?id=1057402

I should probably note that I used to work maintaining that API & other SC aspects for a few years though whoever is left in support should have been able to give you this information about the playlists (even if it meant pointing you to the wiki docs).

Interesting, do you also got an API account?

@dr0biwan
Copy link

It should work without the "http://yp." and just using "http://" so is a bit odd it's not working for the shorter url for you.

I was issued a devid before I was let go though it's not hard to find winamp's own or other peoples devids (not that they're needed for accessing the tunein links).

@davidhedlund
Copy link
Author

davidhedlund commented Apr 30, 2018

It should work without the "http://yp." and just using "http://" so is a bit odd it's not working for the shorter url for you.

Yes, http://shoutcast.com/sbin/tunein-station.pls?id=1057402 (VLC requires "https://") also worked. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants