Reply to topic

kid3-cli help needed

Ken Arromdee
Registered Member

kid3-cli help needed

Tue Jun 16, 2020 10:45 pm
I am trying to create a script to find all mp3 files in the current directory with a blank album, and set the album to "no album".

My attempt was this:

kid3-cli -c "filter '%{album} equals \"\" and %f contains mp3'" -c "set album '(unknown album)'"

This sort of works but has some problems:

  • Although it filters out the non-mp3 files, it doesn't do short circuit evaluation. For instance, I have a zero length (bad) .mp4 file. When it reaches this file it gives me a ReadChildAtoms error. Apparently it tries to check the album on the .mp4 file (failing to do so on the zero length file) before it checks to see if the name contains .mp3 (and changing the order to put the 'contains' first won't fix it).
  • It doesn't limit itself to the current directory.

I also tried a version which used a for loop in the shell to get all the files, and passed the filename in--but I couldn't figure out the syntax to pass the filename to kid3-cli and still filter out files that don't have a blank album name.

How can I do this?

Reply to topic


Who is online

Registered users: Baidu [Spider], Bing [Bot], Garthhh, Google [Bot], ostroffjh, Sogou [Bot]