Logging every song so I never have to hit like
I kept hearing songs I liked and forgetting them, because I never stop to press a like button in the moment. So the laptop writes them all down for me.
How it works
Linux music players announce what they're playing over MPRIS, a standard D-Bus interface. playerctl --follow prints a line every time that changes. A small Python service called songlogd reads those lines and adds a row to a tab-separated file whenever a new track starts playing:
time player artist title album
2026-10-18 21:33:20 strawberry ... ... ...
A songs command reads it back: the last few tracks, today's tracks, the most played, or a search.
Radio
Internet radio is the interesting part. Some stations send the song title in the stream (ICY metadata), and the player passes it on, so radio songs get logged too. Others send nothing useful. Ad breaks show up as titles like "Advertisement" or "Commercial Break", and those rows get skipped.
Each of my two laptops keeps its own log. And the box at the top of this site's home page is the same feed: a second small service pushes the current track here, with the file paths left out.
← All posts