Sunday, April 12, 2020

Pandemic Coronavirus Lockdown Coding Weekend (formerly known as Easter)

Shortly after yesterblog, I discovered www.radio-browser.info was gearing up to switch over to a new API, cutting off the old incompatible API (and the ziptuner along with it) on August 1, 2020.  Uh Oh!  Better get right on that

So now in my third or fourth week (I've lost track) of coronavirus pandemic lockdown, with the impending deadline starting to loom, I decided to get busy with the API update.  The docs claim to "prefer" https, but after some initial success with http, I started geting 301 errors.  So I suspect the https has evolved from a mere preference into a full blown requirement. Ok, so be it. Cryptonecronom here we go again...

On the zipit, the openwrt build of ziptuner adapted just fine to the the new "secure" https API, but the IZ2S build had issues with the certs.  I have no idea where the ancient IZ2S build of libcurl expects to find them.  I was able to pass a cert location to the command line curl program, but was unsuccessful overriding it in the ziptuner code with curl_easy_setopt().  So I'm currently running the new API build of ziptuner for IZ2S with cert verification disabled.  I don't see how that's any less secure than the original http API, so I'm not gonna sweat it for now.  But I'll keep trying...

In the meantime, I managed to squeeze a bit more utility out of the dialog program, making use of backsplash option to show the selection number of whatever station might be currently playing.  Just in case you scroll further down and forget...


I'd like to play some Groovetube, but wait, maybe I should save station 56 first.

Unfortunately this puts the squeeze on size of the station listing box, slicing off a few more precious lines.  So I limited it to screens of 24 lines or more.  On the zipit that's the iz2slat font, or something even smaller.

I also did a bunch more code cleanup and bug fixing.  The code is still not pretty, but it's inching ever closer.  Good enough for a ziptuner 0.6 release on github to support the new API.  And I've included an updated IZ2S binary with the certs.


Bunny tax.  My daughter suggested this, to brighten things up.