diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-27 21:18:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-27 21:18:51 +0200 |
| commit | c78e9f0d5e802e1bb020694870357ef271217628 (patch) | |
| tree | e7fdc2f153206b24495f96f9a20814afe55c5bc6 /src/lib/dcp_content.cc | |
| parent | be48763fb25bf516bd394827979342a30f2a594c (diff) | |
Fixes for new libdcp with multiple content versions.
Diffstat (limited to 'src/lib/dcp_content.cc')
| -rw-r--r-- | src/lib/dcp_content.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 00ffb390c..0bef73f77 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -158,7 +158,9 @@ DCPContent::DCPContent (cxml::ConstNodePtr node, int version) _ratings.push_back (dcp::Rating(i)); } - _content_version = node->optional_string_child("ContentVersion").get_value_or(""); + BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("ContentVersion")) { + _content_versions.push_back (i->content()); + } } void @@ -274,7 +276,7 @@ DCPContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job) _markers[i->first] = ContentTime(i->second.as_editable_units(DCPTime::HZ)); } _ratings = examiner->ratings (); - _content_version = examiner->content_version (); + _content_versions = examiner->content_versions (); } if (old_texts == texts) { @@ -390,7 +392,9 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const i.as_xml (rating); } - node->add_child("ContentVersion")->add_child_text (_content_version); + BOOST_FOREACH (string i, _content_versions) { + node->add_child("ContentVersion")->add_child_text(i); + } } DCPTime |
