Close

Changes to HTTPS Streams

A project log for Python SomaFM Player

Listen to the unofficial soundtrack of Hackaday in your terminal.

Tom NardiTom Nardi 11/26/2021 at 21:481 Comment

Awhile back, SomaFM changed how they handled HTTP/HTTPS when it comes to playlist files. Basically, if the player requests a PLS file using an HTTP link (I.E. http://api.somafm.com/christmas.pls), than the individual links within the file will be HTTP links, and vice versa.

This is a very logical change, but it actually broke my script depending on which OS/player you were using. Now that Remoticon is over and I've had some free time to get back to it, I've gone through and standardized everything to use HTTP other than the initial call for the channels.json. I know this seems counterproductive in 2021, but unfortunately, most of the command line players I'm using for the backend of this script don't support HTTPS streams. 

So if you ran the script within the last couple of weeks and it just failed silently, give the latest version on GitHub a try and see if it fixes things.

Discussions

Xasin wrote 11/26/2021 at 22:57 point

I wonder if a sort of reverse proxy could've been used to circumvent this issue - I'm thinking of a minimal nginx install that exposes an HTTP endpoint locally for the streaming command-line programs to interact with, and just opens up its own HTTPS endpoint to the proper, outside-world interface.

But that would also need a fair bit of messing around with stuff like the PLS files, or a way to redirect traffic... It's all not quite optimal ^^'

  Are you sure? yes | no