Spotify, oops
So, I’ve got a little shell script generates templates for new Song of the Day posts using a simple Hugo archetype. Its got place holders for track name, artist name, and the track id in the Spotify embed widget.
I’ve been filling in the three data items with copy and paste after generating the new post. Lets automate that!
The plan was to add a trackId argument to that script that makes new
Song of the Day posts and call the Spotify API to get the track details and
then plug them into the post automatically. Claude easily changed the script
along those lines and told me where to get a Spotify client/client secret.
So, I went off and did that; it was less hassle than I would have guessed.
So, it was time to test the new script. I pass in my credentials and send it, and watch it blow up. Reset my development area to a clean state and Claude try it. It fixed some error handling logic in its script and then let me know that, oops, the Spotify API is only available if you have Spotify premium. I think I saw something about that when I signed up for the developer account and somehow it didn’t register.
Needless to say, I’m not a Spotify premium user currently, sigh. So, IP parked
the mostly working code on a feature branch for future reference. Then, I told
Claude to back out the API stuff and just leave the part that plugs in the
trackId in the Spotify embed (and also took a non-related bug fix that Claude
suggested).
Oh well, I guess a little more automation is still an improvement.