/ .................................................................................... ├──> Welcome ............................................................................ ├──> Music ........................................................ ├──> Projects .......................................................... ├──> Recipes ........................................................ └──> Contact ........................................................



July 2026
Aggregates last.fm listening history into JSON files for export.
--> https://gitlab.com/slomfish/lastfm-api-compilerIf I could code everything myself, then I would be writing my own scrobbler and hosting it somewhere, as it sounds like a fun project. However, TIDAL’s options for scrobbling are (painfully) limited. I quickly found out that the TIDAL API does not expose any endpoints for what you’re currently listening to, nor for your listening history. Instead you must connect your TIDAL app to last.fm for each device that you’re listening on.
Quite frankly, this sucks and is a bulky method of scrobbling. When I used Spotify, connecting a Last.fm account was a one-and-done deal. I initially connected it back in 2024 and it was still connected until I switched to TIDAL! Nevertheless, it is at least some form of scrobbling.
I find it quite humorous how Last.fm requires its users to pay up for extended listening histories and aggregates. Especially when their free API allows you to do the exact same thing! The script that I wrote to do this is quite simple. It runs an upsert on your listening history until it hits a listen already recorded. Then, it compiles your listening data into the following aggregates:
topalbums_[timeframe].json album_name: The name of the albumartist_name: The artist/s creditedplays: The number of times listened to within the timeframeurl: A link to the album arttopartists_[timeframe].jsonartist_name: The artist’s nameplays: The number of times listened to within the timeframeurl: A link to the artist’s profile image (almost always empty)toptracks_[timeframe].jsonalbum_name: The name of the trackartist_name: The artist/s creditedplays: The number of times listened to within the timeframeurl: A link to the track artaggregated.json
[timeframe]:
total_listensunique_artistsunique_albumsunique_tracksavg_per_daylisten_hours (array of GMT hours and how many listens were made in that hour)listen_days_6mo: (array of days over last 6 months and how many listens were made on that day)This aggregation is necessary to reduce the amount of information being sent to the user each time they open up the music page.
