Wow, does time fly… it’s already been a month since my last update! What has Lil’ Joe been up to? Not a whole lot… just work, work, work.
I think since last time I posted, I’ve pretty much finished up my Spotify to Bluesky integration. I have everything tweaked the way I want it, for now, and it’s working pretty flawlessly. I did have an issue the other day where it randomly posted a bunch of blank posts… something must have happened with the results returned from Spotify when it queried recently liked songs.
The last pieces of work on the integration is around creating wrap-up or recap posts. Not just a post, but build an image based on my listening history. I have two different recaps: 1) a weekly recap that runs Sunday evenings, and 2) a quarterly recap that runs the 1st day of the quarter.
For the weekly recap, I wanted to keep things fairly simple. I pull a listing of songs for the previous week, group by track and count how many times it was played (posted). The highest count wins. In the event of a tie, then the system will randomly choose a song. I also aggregate that data by artist, and the artist played the most wins. Once I have those data elements, I build an image displaying the top played track (along with album art), the top played artist with number of plays. Finally I list the number of new songs I’ve liked in the week, the total number of songs played, and the total number of minutes played.
Similary, for the quarterly recap, I pull the top 5 songs and top 5 artists played. I list the number of songs listened to, new likes, and total minutes. The fun thing about the quarterly recap is I have seasonal color palettes and emojis. So when the recap image is generated, it uses the color palette to build the background, and it randomly scatters the seasonal emojis on the image. Finally the top 5 songs all have their album art displayed.
This was a lot of fun to work on. I’m not really sure how else I can improve it, except to change the image formats and layouts for the recaps. I could change how frequently songs are written into the database… this would allow me to catch repeated listens of songs when I’m really feeling the groove… however I think that would be too much spam for Bluesky.
Now to think about the next project I want to tackle! … Until next time.
Leave a Reply