Old 24th August 2015, 21:45   #1
Junior Member
Join Date: Aug 2015
Posts: 3
Caching station ids for future access.


I'm going through the Radio Directory API documentation and I cannot connect the dots on some points. The documentation says to avoid caching station ids because those ids might and will change. However there is no permanent id which can be used for retrieving this radio station later. How do I make sure that the station which I want to retrieve today didn't change its id?

Dunkan is offline   Reply With Quote
Old 24th August 2015, 22:22   #2
Join Date: Sep 2003
Posts: 27,873
as things currently stand you cannot assume that the id will persist (though it generally does) and is why there's that note in the documentation. especially as there's no guarantee that what you're trying to access (irrespective of the id aspect) is even broadcasting at the time as that is generally in the hands of the broadcasters.

this is primarily due to the 1.x DNAS and them not having a fixed way of look-up in the system which can cause the id to change over time (which 2.x DNAS do not have that basic issue) or due to stations not maintaining the same format and bitrate of the stream (happens a lot with 1.x and shared DJ setups) which leads to a different id being generated (as at that point, it's a different thing).

though in reality, you can generally cache things for a while (*) by id but also track the name, bitrate and format and use that as a means to try to find it again if the request using the id doesn't provide a valid tunein response.

(*) which should be done anyway as things don't change that much in the data responses over a few minutes.
DrO is offline   Reply With Quote
Old 26th August 2015, 18:24   #3
Junior Member
Join Date: Aug 2015
Posts: 3
Thanks, this is helpful!
Dunkan is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

api, developer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump