How to delete extended tags with or without Keep tags?

Tags: #<Tag:0x00007f2a59d2fac0> #<Tag:0x00007f2a59d2f868> #<Tag:0x00007f2a59d2f548>

For the purposes of this post I’ve tagged a royal free sound file from Bensound.com licensed under Creative Commons license. I’m trying to get Picard to purge extended tags through either tagger scripting or with the Keep tags plugin or a combination of the two. I was asked to post an example of the issue I was running into by the plugin author. Basically I am unable to delete extended tags with Picard. They are simply ignored.

The Keep tags plugin line I am attempting to use is:
$keep(title,artist,artists,artistsort,albumartist,albumartistsort,album,language,releasecountry,date,originalartist,originalalbum,originaldate,originalyear,compilation,titlesort,albumsort,acoustid_id,acoustid_fingerprint,genre)

I have tried that with and without a series of $delete commands to purge extra tags which were not being deleted. All the extended tags which do not get deleted start with TXXX in the output below.

How can I script either the delete of an arbitrary extended tag or get the Keep tags plugin to do that without completely clearing all tags using the “clear existing tags” option?

Basically I’m looking to purge certain extended garbage tags such as: Uploaded by, URL, iTunMOVI, Comment [ID3v1 Comment], Ripping tool, Supplier, Source, Rip date, Upload.

This is the output of mutagen-inspect for a file tagged with the problem fields:
$ mutagen-inspect /tmp/bensound-acousticbreeze.mp3
– /tmp/bensound-acousticbreeze.mp3

  • MPEG 1 layer 3, 112000 bps (CBR, LAME 3.99.1+, -b 112), 44100 Hz, 2 chn, 157.15 seconds (audio/mp3)
    COMM==eng=Cool tunes
    TALB=Not applicable
    TCON=POP / RNB
    TCOP=Creative Commons from bensound.com
    TDRC=2014-15
    TENC=Someguy
    TIT2=Acoustic Breeze
    TPE1=Unknown
    TRCK=11
    TXXX=Bit Rate=320kbps
    TXXX=ITUNMOVI=Stuff
    TXXX=RIP DATE=2019-07-07
    TXXX=RIPPING TOOL=Foobar
    TXXX=SOURCE=CD
    TXXX=SUPPLIER=A furry cat
    TXXX=UPLOAD=Some girl
    TXXX=URL=http://google.ca
    TXXX=Uploaded by=Anonymous
    TXXX=WEB SITE=http://google.ca
    WXXX=http://google.ca

You can delete the TXXX tags by their name without the TXXX with something like this:

$delete(ITUNMOVI)
$delete(RIP DATE)
$delete(Uploaded by)

Mind the case!

As I could not find this particular tag on MusicBrainz there might be another issue: Scripts are automatically applied to tags loaded from MusicBrainz. If you don’t match your files against data loaded from MusicBrainz (in the right pane) but just save them in the left pane the scripts are not applied automatically. You can however run scripts manually in the context menu.

3 Likes

That’s very interesting because that didn’t work the first time I tried it. I had tried it a few variations both with and without various kinds of quotes thinking perhaps the spaces were confusing it. The one change I’m aware of is I’m now running a daily version of Picard now. Oddly it doesn’t seem to be case sensitive i.e. $delete(Upload) just deleted a tag of UPLOAD. Problem solved though. Thanks.