New stream URLs via API

Hello again,
I am the author of the Radio Now Playing plugin for LMS - it uses your APIs (some documented and others ... discovered) to show what is playing and also to launch the stream on Squeezebox (and related) players.

I see that new stream URLs are coming.
Is there an API call that I can use to get the stream URLs so that I do not have to manually add them all (I have seen the web page that lists them).
Paul Webster

Kommentarer

  • Good question!
    I will ask the developers and then get back to you.
    Annika Webbmaster
  • By the way:
    I am well aware of Radio Now Playing and have recommended Squeezebox-owner to use your plugin instead of the Tunein-based service they used before, as our content via Tunein is blocked abroad. One listener asked why we are viewing your service as a more secure option, and I wrote:
    Eftersom det finns en transparens där det syns vilka länkar som ligger bakom det som spelas och utvecklaren Paul Webster baserar tjänsten Radio Now Playing på vårt eget API, har den tjänsten inte samma problem som Tunein och vissa andra tredjepartstjänster.
    In English:
    Because there is transparency where you can see which links are being played and the developer Paul Webster bases the service Radio Now Playing on our own API, that service doesn't have the same problems as Tunein and some other third-party services.
    So, it is in our mutual interest you can continue to use our API 😀
    Annika Webbmaster
  • Thanks - and yes I am aware.
    I think our old discussion here has been archived away somewhere.

    An updated "audiourltemplates" ... and documented values for "quality" (which was high, medium, low and may well still be) could be good.
    Paul Webster
  • I think our old discussion here has been archived away somewhere.
    Yes, here you are:
    FLAC streams for radio

    The "audiourltemplates" 2-5 will still be ok and redirected to our new streams. BUT (and this is an old problem) templates 2 and 5 are malfunctioning when it comes to protocols and gives you an https-stream although you used an http-URL.

    I think that the templates 3 and 4 gives you http-streams but in cantainers of pls/m3u if you use http.
    • <urltemplate id="2" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid].mp3"/>
    • <urltemplate id="3" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http.pls"/>
    • <urltemplate id="4" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http.m3u"/>
    • <urltemplate id="5" url="http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http"/>
    The quality-parameter can be lo (low), hi (high) or left out (normal). The channelid you find here:
    https://api.sr.se/api/v2/channels?pagination=false&format=json
    Annika Webbmaster
  • An example:
    http://sverigesradio.se/topsy/direkt/srapi/[channelid]-[quality]-aac-http

    High quality, ID 132 (the station P1):
    http://sverigesradio.se/topsy/direkt/srapi/132-hi-aac-http
    Starts https://edge1.sr.se/p1-aac-320 or https://edge2.sr.se/p1-aac-320

    In medium quality you get:
    http://sverigesradio.se/topsy/direkt/srapi/132-aac-http
    Starts https://edge1.sr.se/p1-aac-128 or https://edge2.sr.se/p1-aac-128
    Annika Webbmaster
  • Will they change to the new live1.sr.se domain ?
    Paul Webster
  • The live1.sr.se is redirecting to the servers edge1.sr.se or edge2.sr.se, so these are the new streams. For example P2 (previously known as P2 Music) is using this URL for AAC 320 in our list Länkar till ljudströmmar för alla kanaler:
    https://live1.sr.se/p2-aac-320


    It redirects to https://edge1.sr.se/p2-aac-320 (or edge2 etc)

    It is the same stream as you get from http://sverigesradio.se/topsy/direkt/srapi/2562-hi-aac-http

    The old streams (that are still up and running) were on a server named http-live.sr.se:
    https://http-live.sr.se/p2musik-aac-320
    Annika Webbmaster
  • In the future we might add more servers aside of edge1 and edge2, but as far as we can manage it both the live1.sr.se- and the sverigesradio.se/topsy- will continue to get our audience to the technique we consider as the best.
    Annika Webbmaster
  • OK - I think I have a solution ready to go.
    I'll probably make a version available to beta testers today or tomorrow.

    I am going to stick with live1 for now but if someone plays edge1 directly (not requesting via RNP) then I will still detect it and dynamically add the programme/song info.
    Paul Webster
  • As you might see some of the stations available via our API are not part of the list Länkar till ljudströmmar för alla kanaler. The exceptions are the "Extrakanals" and "P2 Språk & musik".

    Extrakanal 1 etc
    Extrakanals are sending content not aired in the ordinary stations, most often football or ice hockey, on a very irregular basis. There is no usable way for the audience to know which of the channels we are going to use for a scheduled match and browsing around among 12 different stations in hope of catching the right one is not a behavior I think our audioence on Radio Now Playing are interested in.

    P2 Språk & musik
    P2 Språk & musik is an FM-product. Due to limitation in frequencies, "P2 in FM" is sending an odd combination of content in Finnish, Romani and other "non Swedish languages" part of the day, and classical music, jazz and folk music most of the time.

    On internet we have divided this into separate stations. P2 with music 24/7, and P6 for non Swedish content. They are both better options and thus we don't list P2 Språk & musik among our internet stations.
    Annika Webbmaster
  • Thanks.
    The beta is now available.
    I already had a work around for P2 Språk & musik ... although I did not keep brilliant notes about the approach that I took.

    Paul Webster
  • Just leave P2 Språk & musik out. It doesn't add any value to your users 😀

    If you still feel you wan't to have it, please beware of the confusion due to old names in the API, that cased you some trouble in July 2024.

    P2:
    The station we think is better suited for digital listeners, music 24/7
    Name in API: P2 Musik
    ID: 2562

    P2 Språk och musik:

    The "FM-product", left out in our newer list but still present in the API
    Name in API: P2
    ID: 163
    Annika Webbmaster

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post syns inte publikt.