sandreas / tone

tone is a cross platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, including mp3, m4b, flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.
https://pilabor.com
Apache License 2.0
410 stars 17 forks source link

--meta-subtitle is not written if file does contain any metadata #46

Open scapix opened 1 year ago

scapix commented 1 year ago

remove all tags (eg. using eyeD3 --remove-all x.mp3)

tone tag x.mp3 --meta-subtitle="Subtitle"

no subtitle tag is written

sandreas commented 1 year ago

Thanks for reporting, I'll take a look asap.

sandreas commented 1 year ago

Ah, I see. This really is an issue. The reason is, that Subtitle is considered as an AdditionalField internally and these are only set, if there is a specific set of metadata in the file.

If all metadata is gone, the format (id3v1 / id3v2) is not detected correctly and so the value is skipped with no message.

The problem is caused here:

As a workaround, you can set ANY non-AdditionalField and then try to set Subtitle again, e.g.:

tone tag --meta-title="a title" x.mp3
tone tag --meta-subtitle="a subtitle" x.mp3 # this will work only AFTER the line before

I'll try to fix that in the next release, but this is a nasty one... maybe it'll take some time.