Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing custom tags #43

Open
DziubanMaciej opened this issue Sep 11, 2023 · 0 comments
Open

Removing custom tags #43

DziubanMaciej opened this issue Sep 11, 2023 · 0 comments

Comments

@DziubanMaciej
Copy link

Some files may contain custom tags, which are not hardcoded in the library. For example I encountered a file with "album artist" instead of "albumartist". Or I can just insert "abc" tag in a program like Picard or mp3tag to test a completely random tag name.

Removing them with f.remove_tag(tag_name) doesn't work. For "album artist", the tag is still in the file after saving. For "abc", a KeyError is raised during lookup in AudioFile.tag_map, which does not contain "abc" entry, even though there is a tag named like that in the audio file.

I found a workaround based on #28: del f.mfile.tags[tag_name] However, it doesn't look like the expected usage of the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant