diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-10-15 00:52:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-10-15 00:52:58 +0100 |
| commit | 9476c535e929974cc11070002938bbc9476cce32 (patch) | |
| tree | d636abc4e63b0bc24af6a6494fb87d7c70b3d45b | |
| parent | 8726c70cc1b14dc996c18670cdcda0b4d670605e (diff) | |
Add KDMs after resolving asset references; don't complain
if a single KDM fails to decrypt a VF/OV combination.
| -rw-r--r-- | src/lib/dcp.cc | 9 | ||||
| -rw-r--r-- | src/wx/content_menu.cc | 19 | ||||
| -rw-r--r-- | src/wx/content_menu.h | 1 |
3 files changed, 7 insertions, 22 deletions
diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc index 6d5c0b291..f58b06b57 100644 --- a/src/lib/dcp.cc +++ b/src/lib/dcp.cc @@ -38,9 +38,6 @@ DCP::cpls () const BOOST_FOREACH (boost::filesystem::path i, _dcp_content->directories()) { shared_ptr<dcp::DCP> dcp (new dcp::DCP (i)); dcp->read (false, 0, true); - if (_dcp_content->kdm ()) { - dcp->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); - } dcps.push_back (dcp); BOOST_FOREACH (shared_ptr<dcp::CPL> i, dcp->cpls()) { cpls.push_back (i); @@ -55,5 +52,11 @@ DCP::cpls () const } } + if (_dcp_content->kdm ()) { + BOOST_FOREACH (shared_ptr<dcp::DCP> i, dcps) { + i->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); + } + } + return cpls; } diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index ad6d6fc65..de3aceac0 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -379,30 +379,13 @@ ContentMenu::kdm () shared_ptr<Film> film = _film.lock (); DCPOMATIC_ASSERT (film); - shared_ptr<Job> j (new ExamineContentJob (film, dcp)); - _job_connections.push_back ( - j->Finished.connect (bind (&ContentMenu::check_kdm_validity, this, weak_ptr<DCPContent> (dcp))) - ); - JobManager::instance()->add (j); + JobManager::instance()->add (shared_ptr<Job> (new ExamineContentJob (film, dcp))); } d->Destroy (); } void -ContentMenu::check_kdm_validity (weak_ptr<DCPContent> wp) -{ - shared_ptr<DCPContent> dcp = wp.lock (); - if (!dcp) { - return; - } - - if (dcp->needs_kdm ()) { - error_dialog (0, _("The KDM does not decrypt the DCP. Perhaps it is targeted at the wrong CPL.")); - } -} - -void ContentMenu::ov () { DCPOMATIC_ASSERT (!_content.empty ()); diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h index 7b1e663fa..84daa71a5 100644 --- a/src/wx/content_menu.h +++ b/src/wx/content_menu.h @@ -50,7 +50,6 @@ private: void remove (); void maybe_found_missing (boost::weak_ptr<Job>, boost::weak_ptr<Content>, boost::weak_ptr<Content>); void cpl_selected (wxCommandEvent& ev); - void check_kdm_validity (boost::weak_ptr<DCPContent> wp); wxMenu* _menu; wxMenu* _cpl_menu; |
