Retag all files from scratch matching an query

Hello, in many of my old mp3 files I have some obscure tags from programms I used in the past. So I want to remove them with the --from-scratch option from the import command. I have already imported them into my library, so I need to use the -L option for the import command. As the problem only occurs in my old mp3 files, I only want to retag these from scratch, and not my newer flac files, because they have some custom tags I dont want to loose…
But the only query which seems to be working on the beet import -L command is album.

I tried this command:

beet import -L “format:MP3” --from-scratch

but it does nothing. The query is working fine in beet stats.

Is this normal that I just can use the album keyword?
If not, how do I need to modify my command to just tag the mp3 files?

I also tried this:

beet import -L “album::.*” format:MP3 --from-scratch

but that does nothing too.

Hi,

I am very new to beets, but I guess that is because the format field is a track-level field, so the query returns tracks (properly taken into account by stats, but for instance beet ls -a 'format:MP3' should return an empty result). The import, however, works in an album-oriented mode by default.

You can try with the -s import option, which tells the import that the query matches individual tracks.

Hope this helps,
Fe

2 Likes

Yes that helped me thanks.

I just imported then my complete library from scratch. But I saw that it didn’t bring me to my desired result. The scrub plugin is my solution to for what I want…