As described in another topic, i want to remove tag frames with a certain content. I am setting these unavailable tag frames to "n/a". Until now, i used an replace tag action like this:
Replace With: ""
to empty (and thus remove) all fields marked as unavailabe. Looking back, I'm not sure if this ever worked. After applying my action, the tag frames are still in the file, just with empty content, ie. they are not removed. So, it seems that the code that removes empty fields is not triggered when emptying a field from an action.
I guess, it is tied to UI "Save Tag" functionality. Manually invoking the extended tag dialog and saving the tags gives me the desired result, the empty tag frames are actually removed from the file.
How can i conditionally delete all tag frames with a specific fixed string from within an action without further user interaction?
I added the quotes only to point out that the action replaces n/a with nothing. The fields in the action dialog do not contain any apostrophes. Anyway, as I also wrote, the action does only replace the contents, but does not remove any empty fields. I do not know if this has been changed with one of the last mp3tag versions or if it has never worked.
So I'm still looking for a way to achieve what i asked for. Conditionally deleting all fields with a fixed string content with an action but w/o further user intervention.
Replace does not do the job.
Of course i read what pone wrote and this was exactly what i was doing. But, as mentioned above and in my initial post, it does not delete the fields, it just empties them.
I've tried the task using the action "Replace" with mp3 files having tag-fields containing only text 'n/a' ... and it works as expected. Mp3tag automatically removes all empty tag-fields from the tag, I have checked it using dialog "Extended Tags...".
If you got other result, then there might be going on something unusual at your side, please check it again.
Yes, this is what i did too. The frames are still in the file, they have just zero length values. Detlef, mp3tag does not show empty tags so it does not make sense to rely on mp3tag to confirm if the tags have been removed or not.
I noticed the problem only because my mp3 player showed me empty album tags where i didnt expect album tags at all.
Now I understand that you were looking behind the scenes at the binary level, and that you were talking all the time about technical ID3 data frames, not ID3 tag-fields.
And I have spoken about the behavior of Mp3tag from the perspective of the normal user.
You should complain to the manufacturer of your mp3 player that empty frames should not be respected and should not be displayed to the user.
You should complain to the manufacturer of Mp3tag that empty frames should be completely deleted.