Radio player status

Status update about the changes incoming to

The whole php code has been pretty much recoded from scratch and is now much more stable overall as a codebase. The intial release was my first real project coded under the PHP language, so there was many methods i was using that wasn’t practical and messy for sure.

The first stage of the recoding process was rewriting the updater to grab the latest stations and add them to the database, this surprisingly took a lot of trial and error because the API itself is quite unstable at times (So i had to add extra checks for invalid results and then retry if the response wasn’t 200/Ok – capped at 10 retries).

Take the way you need to grab the playlists:

To tune into a station, find the “id” of the station from the API results & make a call to<base>?id=[Station_id] by appending the station id.

Problem here is the server on appears to get a lot of requests and sends a 404 error when there is too many at once, which happens a lot. So to overcome this you need to retry and check the response for 200. The old method was only running 1 query without any retries, so you can imagine how many stations wasn’t getting added to the database because of bad responses.

Another major change is pre-checking mount points during the backend update process, which is 1000 times faster over the previous method of checking them in almost realtime, and caching the header response.

All the backend code is done now and everything is backwards compatible with the old query methods inside the Radio plugin.

It’s the UI/UX code that I’m currently working on, which isn’t my strongest point for sure, javascript is a slow learning process. I was thinking about releasing the functioning UI as-is which will still work with the radio plugin and slowly work on a prettier and browsable UI over time.

If anyone has any questions or comments feel free to post below or contact me through the contact page above. Would love some feedback about releasing the updated radio player now and adding the UI/UX features over time.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.