diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-27 13:19:21 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-27 13:19:21 +0100 |
| commit | c85e9dfbeeb447332545d40ac52c07630fbb9121 (patch) | |
| tree | 7afd810a3f151f8cc3b4224e4dcb3a52c899bba5 /rotord/src/graph.cpp | |
| parent | 150c9823e71a161e97003849cf8b2f55b21520bd (diff) | |
audio thumbnail vector data
Diffstat (limited to 'rotord/src/graph.cpp')
| -rw-r--r-- | rotord/src/graph.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp index 5871b7b..162232f 100644 --- a/rotord/src/graph.cpp +++ b/rotord/src/graph.cpp @@ -187,7 +187,15 @@ bool Graph::parseJson(string &data,string &media_path){ else cerr << "Rotor: cannot find parameter '" << parameter << "' of "<<settings["type"]<<" "<< nodeID << endl; } - // + //attributes + for (int m=0;m<jnodes[i]["attributes"].size();m++){ + string attribute=jnodes[i]["attributes"][m]["name"].asString(); + if (nodes[nodeID]->attributes.find(attribute)!=nodes[nodeID]->attributes.end()) { + string val=jnodes[i]["attributes"][m]["value"].asString(); + nodes[nodeID]->attributes.find(attribute)->second->value=val; + } + else cerr << "Rotor: cannot find attribute '" << attribute << "' of "<<settings["type"]<<" "<< nodeID << endl; + } } else cerr << "Rotor: duplicate node '"<<nodeID<<"' "<< endl; |
