Extract all id3 frames from file

This commit is contained in:
Deluan
2020-09-08 11:58:07 -04:00
committed by Deluan Quintão
parent 5dea258058
commit 4d18212f5d
2 changed files with 11 additions and 9 deletions
+4 -4
View File
@@ -57,10 +57,10 @@ int taglib_read(const char *filename, unsigned long id) {
if (mp3File->ID3v2Tag()) {
const auto &frameListMap(mp3File->ID3v2Tag()->frameListMap());
if (!frameListMap["TCMP"].isEmpty())
tags.insert("compilation", frameListMap["TCMP"].front()->toString());
if (!frameListMap["TSST"].isEmpty())
tags.insert("discsubtitle", frameListMap["TSST"].front()->toString());
for (const auto &[name, values] : frameListMap) {
if (!values.isEmpty())
tags.insert(name, values.front()->toString());
}
}
}