Sunday, 14 April 2024

Clementine playlist recovery



The Dynamic Playlist Mode is quite good - shuffle, but with casually weeding the incoming sound, and a little history:


It turns the playlist into a spool. I somehow engaged the Dynamic Playlist Mode on my playlist of violin music! I suddenly had random tracks where my human meanings were.

But then, Clementine has a database backup from just before I did that:


I make a copy immediately in case it's about to get backed over.

The sql, mostly discoverable via sqlite's .tables and .schema commands, also involves knowing they use ROWID

$ sqlite3 ~/.config/Clementine/clementine-withvio.db "select songs.filename from playlists as pl join playlist_items as p on p.playlist = pl.rowid join songs on p.library_id = songs.ROWID where pl.name = 'vio';" | less

Then you ask ChatGPT to convert that to .m3u. Claude had a couple of woopsies doing the same thing: left out the last one, one filename has underscores moved around.

So transformers are a good invention! Saves me writing perl.

Thanks also to time for allowing this backup to exist.

I had one but it broke

This mode turns itself off sometimes - perhaps after some crashes? You are left with a non-dynamic playlist called "Dynamic random mix" which is to be deleted and then dragged back again (to the playlist tabs) from here:

Which only appears in Library, without a search term.

Yay



No comments:

Post a Comment