Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iterate through taglib property map

Good Evening,

Recently I found the taglib library. It's a really nice one but I can't find a possibility to get the keys and values of unkown keys in a property map (in other words to iterate the map).

This code is used for getting the map:

TagLib::FileRef file(file_path);
TagLib::PropertyMap map = file.tag()->properties();

Any ideas?

like image 842
user1678062 Avatar asked Nov 17 '25 15:11

user1678062


1 Answers

You can iterate the same way you iterate over a standard container:

for (auto it = map.begin(); it != map.end(); it++) {
    // Do something with it.
}

The documentation shows PropertyMap extends List<T>, which seems to satisfy all container requirements.

like image 197
jweyrich Avatar answered Nov 19 '25 03:11

jweyrich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!