Lyric file organisation/renaming script

I recently renamed my library to includethe truncated release ID - so moving from /Artist/Release/01. Track.flac to /Artist/Release [mbid8]/01 Track.flac. Unfortunately Picard deosn’t pick up and rename my lyrics files (.lrc and .txt files named the same as the tracks they’re for). So save me manually moving thousands of files, I wrote up a relatively short python script to try and match the lyrics in the old folder to the new folders:

The specifc change to the file naming script:

$noop(Release folders)

$if(%_albumForFilename%,%_albumForFilename% ,)$if(%musicbrainz_albumid%,[$left(%musicbrainz_albumid%,8)])

$if(%_albumForFilename%%musicbrainz_albumid%,/)

Hopefully people find this useful!

3 Likes