X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fkdm_dialog.cc;h=d3bbf02c998e164ec4f317a00db7c80a04d9718c;hb=6ef1fc5f40567650ca9ef2b7644e4fdd97640ae6;hp=d74741871a63213fefbdd8419b506f7f7b9146e6;hpb=0a1d944d74308ccb940194bcb627652c72128650;p=dcpomatic.git diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index d74741871..d3bbf02c9 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -162,35 +162,11 @@ KDMDialog::make_clicked () } BOOST_FOREACH (shared_ptr i, _screens->screens()) { - if (i->recipient) { - dcp::LocalTime const begin(_timing->from(), i->cinema ? i->cinema->utc_offset_hour() : 0, i->cinema ? i->cinema->utc_offset_minute() : 0); - dcp::LocalTime const end(_timing->until(), i->cinema ? i->cinema->utc_offset_hour() : 0, i->cinema ? i->cinema->utc_offset_minute() : 0); - - dcp::EncryptedKDM const kdm = film->make_kdm ( - i->recipient.get(), - i->trusted_device_thumbprints(), - _cpl->cpl(), - begin, - end, - _output->formulation(), - !_output->forensic_mark_video(), - for_audio - ); - - dcp::NameFormat::Map name_values; - if (i->cinema) { - name_values['c'] = i->cinema->name; - } - name_values['s'] = i->name; - name_values['f'] = film->name(); - name_values['b'] = dcp::LocalTime(begin).date() + " " + dcp::LocalTime(begin).time_of_day(false, false); - name_values['e'] = dcp::LocalTime(end).date() + " " + dcp::LocalTime(end).time_of_day(false, false); - name_values['i'] = kdm.cpl_id(); - - kdms.push_back (KDMWithMetadataPtr(new DCPKDMWithMetadata(name_values, i->cinema, kdm))); + KDMWithMetadataPtr p = kdm_for_screen (film, _cpl->cpl(), i, _timing->from(), _timing->until(), _output->formulation(), !_output->forensic_mark_video(), for_audio); + if (p) { + kdms.push_back (p); } } - } catch (dcp::BadKDMDateError& e) { if (e.starts_too_early()) { error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));