Add support for ITUNESADVISORY tag in M4A files
Currently, trying to add the ITUNESADVISORY tag to mark Explicit and Clean versions of a track gives an error saying the tag is not supported in ALAC files. MP3Tag does write the tag correctly though and it's recognised in iTunes.
Metatogger uses the taglib library to read and write tags. And taglib doesn’t support the ITUNESADVISORY Apple specific tag.
You will find in the following source code all MP4 tags supported by taglib (take a look at the ‘keyTranslation’ array):
https://github.com/taglib/taglib/blob/master/taglib/mp4/mp4tag.cpp#L833
If you think taglib should support this tag, feel free to open an issue here:
https://github.com/taglib/taglib/issues
-
You seem to confuse taglib (C++) and taglib# (C#). Metatogger uses the first one via a C++/CLI wrapper: NTagLib (https://github.com/luminescence-software/NTagLib)
(Edited by admin) -
mike commented
There is a way of doing it using taglib apparently - I found this on Stackoverflow (https://stackoverflow.com/questions/42423972/setting-explicit-tag-for-apple-m4a-file-with-taglib)
var tags = (TagLib.Mpeg4.AppleTag) f.GetTag(TagLib.TagTypes.Apple);
TagLib.ByteVector customTagName = "rtng";
TagLib.ByteVector customTagData = new byte[] { 1 };
var customTagFlag = (UInt32)TagLib.Mpeg4.AppleDataBox.FlagType.ContainsData;
tags.SetData(customTagName, customTagData, customTagFlag);Unfortunately I can't get this code to work in the script window of Metatogger. Should this be possible? If not I'll just stick to MP3Tag for this part of my tagging, although it'd be lots better if it was all in the one place as I love Metatogger's scripting
Mike