musikr: fix internal frame parsing
This commit is contained in:
parent
1d84ba23b4
commit
2b46774215
1 changed files with 3 additions and 6 deletions
|
@ -67,12 +67,9 @@ template<typename T>
|
||||||
void mp4AddImpl(JVMTagMap &map, TagLib::String &itemName, T itemValue) {
|
void mp4AddImpl(JVMTagMap &map, TagLib::String &itemName, T itemValue) {
|
||||||
if (itemName.startsWith("----")) {
|
if (itemName.startsWith("----")) {
|
||||||
// Split this into it's atom name and description
|
// Split this into it's atom name and description
|
||||||
auto split = itemName.split(":");
|
auto split = itemName.find(':');
|
||||||
if (split.size() != 2) {
|
auto atomName = itemName.substr(0, split);
|
||||||
throw std::runtime_error("Invalid atom name");
|
auto atomDescription = itemName.substr(split + 1);
|
||||||
}
|
|
||||||
auto atomName = split[0];
|
|
||||||
auto atomDescription = split[1];
|
|
||||||
map.add_combined(atomName, atomDescription, itemValue);
|
map.add_combined(atomName, atomDescription, itemValue);
|
||||||
} else {
|
} else {
|
||||||
map.add_id(itemName, itemValue);
|
map.add_id(itemName, itemValue);
|
||||||
|
|
Loading…
Reference in a new issue