I have been working on a photo-display project that will showcase photos and album art. In order to accomplish this, I needed to extract album art from the music that is currently playing. I decided to gather this information from Last.fm it is a reliable source that combines multiple sources of information.
The project pulls recent tracks from Last.fm and distributes the information through MQTT and WebSocket. I have also created a small browser application to display the currently playing track, artist, album, and album art.
I’m building a photo-display that will show photos and album art. For that reason I needed to extract album art from what I’m playing. Since there is multiple sources this could be gathered from Last.fm is joining these sources together.
This projects pulls recent tracks from Last.fm and distributes it to MQTT and WebSocket. A small browser app to show what’s playing now.
Mqtt payload
The payload sent through MQTT is in JSON format, and includes the following information:
Track: The name of the currently playing track
Artist: The name of the artist of the currently playing track
Album: The name of the album of the currently playing track
Now Playing: A boolean value indicating whether the track is currently playing
MBID: The MusicBrainz ID of the currently playing track
Image: A URL linking to the album art of the currently playing track
If you are interested in this project, you can find the code on GitHub or read my notes here.