ALBUMARTIST via question

Rob Arnold rob at
Sat May 9 09:47:44 UTC 2015

Hi, I’m trying to access the album artist tag via the property map from the generic Tag properties() method, but it and a few other tags (disc number for example) aren’t showing up in the map.  Am I misunderstanding the purpose of the property map?  

I thought the simple generic interface was limited to a very few common tags like artist, title, etc. but that the property map would get filled out with all recognized properties, such as the ones described on it’s doc page linked below.  I know that album artist is implemented by several different actual tag types in the various file formats, but thought that they got mapped to the ALBUMARTIST key.

Based on the API docs at , I’m using “ALBUMARTIST” as the key, but even when I just iterate through the map, I don’t see it, just ALBUM, ARTIST, DATE, TITLE, GENRE, and TRACKNUMBER.  I’ve checked this with mp3, Apple Lossless (in a m4a container, as usual), AAC (m4a), and FLAC.  I’ve checked the tags on the files with mp3tag which reads and sets them fine

I’m getting the Tag object from a TagLib::FileRef

When scanning the mailing list archives, I found a short thread from late Sept 2014: Is there a way to get the specific Tag implementation from the generic one? ( )

But it didn’t really show a resolution.  To answer the question posed though, I’ve tried all the above file types, and am not seeing the properties() property map filled out completely, nor is there anything in the unsupportedData() list (where I thought it might all be shoved, if not put into the map)

Here’s the code I was using to dump the properties.  It’s from an Objective-C++ file, if you’re wondering about the NSLog and [url fileSystemRepresentation] bits.  Try to ignore those :)  

    TagLib::FileRef f([url fileSystemRepresentation], false);
    TagLib::Tag *t = f.tag();
// <snip>    
        auto props = t->properties();
        NSLog(@"Remap Check for %s", [url fileSystemRepresentation]);
        for (auto p : props) {
            NSLog(@"Property: %s  => %s", p.first.toCString(true), p.second.toString().toCString(true) );
        auto unsupportedData = props.unsupportedData();
        for (auto s : unsupportedData) {
            NSLog(@"Unsupported data item: \"%s\"", s.toCString(true));

I wrote the property dump code to figure out why I was never seeing the below be anything other than an empty StringList.
auto albumArtistList = props[“ALBUMARTIST”];

Thanks for any pointers provided.  Taglib has made things a lot easier for me.  I hope it can handle this part easily too.

More information about the taglib-devel mailing list