musikr: fix internal frame parsing
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user