X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=954c135d3a90d4e43fcfa0e4e3b34ea4b81320e0;hb=f37c1e40dcd5186c5aee95a4b0e6607c1b0045e4;hp=8b51eb58759a1364ed9af4fc80ff388401b164e1;hpb=68798e3ed491d642bb52e3d70dbe9c204aeb614b;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 8b51eb587..954c135d3 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -629,6 +629,9 @@ Writer::finish (boost::filesystem::path output_dcp) for (auto i: film()->content_versions()) { cv.push_back (dcp::ContentVersion(i)); } + if (cv.empty()) { + cv = { dcp::ContentVersion("1") }; + } cpl->set_content_versions (cv); cpl->set_full_content_title_text (film()->name()); @@ -689,14 +692,11 @@ Writer::finish (boost::filesystem::path output_dcp) throw InvalidSignerError (reason); } - dcp.write_xml ( - issuer, - creator, - dcp::LocalTime().as_string(), - film()->dcp_name(), - signer, - Config::instance()->dcp_metadata_filename_format() - ); + dcp.set_issuer(issuer); + dcp.set_creator(creator); + dcp.set_annotation_text(film()->dcp_name()); + + dcp.write_xml (signer, Config::instance()->dcp_metadata_filename_format()); LOG_GENERAL ( N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT, %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk