Change URL of DigitalCD radio station?
Rick Murray (539) 13840 posts |
Does anybody know if it is possible to change the URL of a radio station in the DigitalCD playlist in a programmatic manner (without hacking the file directly, that is). I ask because 96.4 Eagle is at http://str1.sad.ukrd.com/eagle but this is a redirect which DigitalCD can’t handle, so I’ve written a short program to retrieve the HTTP header which provides the new data location (seems to vary domain prefix for load balancing, and to suffix a value which may be based upon the IP address; if the IP changes, a new value is required). Before I go the whole hog and pull the playlist file apart, I thought I’d ask, in case there’s a SWI or WimpMessage or something that I didn’t find in the docs… |
Jeffrey Lee (213) 6048 posts |
I suspect the correct answer to your problem is to send your code to AndrĂ© so that he can incorporate it into the next DigitalCD release :-) (Disclaimer: I’m not actually sure which part handles streaming radio, so maybe it’s a third-party module that would need modifying) |
Rick Murray (539) 13840 posts |
All my code does is pluck “Location:” out of the HTTP header (302, IIRC). There is probably already suitable code already present as it understands and reports on a 404, so all it needs is to understand a redirection. I rewrote my socket code in BASIC and then threw together an app to run just before DigitalCD starts and directly modify the playlist (discard the existing Eagle entry and write out the new URL). There’s a lot of string operations and such and I really didn’t feel like wrestling with C for a simple MID$ so I just figured it was less grief to do it all in BASIC. I’d drop a copy on my site, but RISC OS is lacking an SFTP client that supports public key authentication.1 1 This means even if you manage to discover my password (which is unlikely as it is a long string of line noise that most people on the planet don’t have a hope of remembering), you still won’t be able to log in. It requires an RSA key – of which two copies exist in the world. One is on my computer (in WinSCP) and the other is a backup on a floppy disc. |
Rick Murray (539) 13840 posts |
In case anybody else in the Guildford/Aldershot/Camberley area wants to listen using DigitalCD… put this in the same directory as DigitalCD and add an entry to !Run to run this just before starting DigitalCD itself. The “value” changes after a little while of inactivity, so if trying to play The Eagle gets you a 404, quit DigitalCD and restart it to refresh. This process may work for other UKRD streams – I’ve not tested this though.
|