if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) {
auto dcp = make_shared<DCPContent>(can);
film_content_list.push_back (dcp);
- dcp->add_kdm (dcp::EncryptedKDM(dcp::file_to_string(*cli_content.kdm)));
+ if (cli_content.kdm) {
+ dcp->add_kdm (dcp::EncryptedKDM(dcp::file_to_string(*cli_content.kdm)));
+ }
} else {
/* I guess it's not a DCP */
film_content_list = content_factory (can);
if (jm->errors ()) {
for (auto i: jm->get()) {
if (i->finished_in_error()) {
- cerr << i->error_summary() << "\n"
- << i->error_details() << "\n";
+ cerr << i->error_summary() << "\n";
+ if (!i->error_details().empty()) {
+ cout << i->error_details() << "\n";
+ }
}
}
exit (EXIT_FAILURE);