diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-26 23:29:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-27 00:30:25 +0100 |
| commit | ce01ccc1aa871d299ad96683055c4e06a355efb9 (patch) | |
| tree | 781c9e4549cddd5e88d5197518b86b144cedc16f /src | |
| parent | 2a7e446d1ae0e80b690fada2d60c55fd829d107f (diff) | |
Remove timing selection from DKDM dialog.
Maybe there is some software that respects the timings, but it seems
slightly deceptive to pretend there's any point in setting them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dkdm_recipient.cc | 13 | ||||
| -rw-r--r-- | src/lib/dkdm_recipient.h | 4 | ||||
| -rw-r--r-- | src/wx/dkdm_dialog.cc | 14 | ||||
| -rw-r--r-- | src/wx/dkdm_dialog.h | 2 | ||||
| -rw-r--r-- | src/wx/dkdm_output_panel.cc | 4 |
5 files changed, 10 insertions, 27 deletions
diff --git a/src/lib/dkdm_recipient.cc b/src/lib/dkdm_recipient.cc index bd14aedea..c68c915d5 100644 --- a/src/lib/dkdm_recipient.cc +++ b/src/lib/dkdm_recipient.cc @@ -36,9 +36,7 @@ KDMWithMetadataPtr kdm_for_dkdm_recipient ( shared_ptr<const Film> film, boost::filesystem::path cpl, - DKDMRecipient const& recipient, - dcp::LocalTime valid_from, - dcp::LocalTime valid_to + DKDMRecipient const& recipient ) { if (!recipient.recipient()) { @@ -50,13 +48,16 @@ kdm_for_dkdm_recipient ( throw InvalidSignerError(); } - auto const decrypted_kdm = film->make_kdm(cpl, valid_from, valid_to); + auto start = signer->leaf().not_before(); + start.add_days(1); + auto end = signer->leaf().not_after(); + end.add_days(-1); + + auto const decrypted_kdm = film->make_kdm(cpl, start, end); auto const kdm = decrypted_kdm.encrypt(signer, recipient.recipient().get(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0); dcp::NameFormat::Map name_values; name_values['f'] = kdm.content_title_text(); - name_values['b'] = valid_from.date() + " " + valid_from.time_of_day(true, false); - name_values['e'] = valid_to.date() + " " + valid_to.time_of_day(true, false); name_values['i'] = kdm.cpl_id(); return make_shared<KDMWithMetadata>(name_values, CinemaID(0), recipient.emails, kdm); diff --git a/src/lib/dkdm_recipient.h b/src/lib/dkdm_recipient.h index 64da41cff..cf0474354 100644 --- a/src/lib/dkdm_recipient.h +++ b/src/lib/dkdm_recipient.h @@ -49,8 +49,6 @@ KDMWithMetadataPtr kdm_for_dkdm_recipient ( std::shared_ptr<const Film> film, boost::filesystem::path cpl, - DKDMRecipient const& recipient, - dcp::LocalTime valid_from, - dcp::LocalTime valid_to + DKDMRecipient const& recipient ); diff --git a/src/wx/dkdm_dialog.cc b/src/wx/dkdm_dialog.cc index a36a9ceae..8444418c6 100644 --- a/src/wx/dkdm_dialog.cc +++ b/src/wx/dkdm_dialog.cc @@ -24,7 +24,6 @@ #include "dkdm_dialog.h" #include "dkdm_output_panel.h" #include "kdm_cpl_panel.h" -#include "kdm_timing_panel.h" #include "recipients_panel.h" #include "static_text.h" #include "wx_util.h" @@ -81,14 +80,6 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film) _recipients = new RecipientsPanel (this); left->Add (_recipients, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP); - /* Sub-heading: Timing */ - /// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix - h = new StaticText (this, S_("KDM|Timing")); - h->SetFont (subheading_font); - right->Add (h); - _timing = new KDMTimingPanel (this); - right->Add (_timing); - /* Sub-heading: CPL */ h = new StaticText (this, _("CPL")); h->SetFont (subheading_font); @@ -122,7 +113,6 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film) /* Bind */ _recipients->RecipientsChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this)); - _timing->TimingChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this)); _make->Bind (wxEVT_BUTTON, boost::bind(&DKDMDialog::make_clicked, this)); _cpl->Changed.connect(boost::bind(&DKDMDialog::setup_sensitivity, this)); @@ -139,7 +129,7 @@ DKDMDialog::setup_sensitivity () { _recipients->setup_sensitivity (); _output->setup_sensitivity (); - _make->Enable (!_recipients->recipients().empty() && _timing->valid() && _cpl->has_selected()); + _make->Enable (!_recipients->recipients().empty() && _cpl->has_selected()); } @@ -162,7 +152,7 @@ DKDMDialog::make_clicked () list<KDMWithMetadataPtr> kdms; try { for (auto i: _recipients->recipients()) { - auto p = kdm_for_dkdm_recipient(film, _cpl->cpl(), i, _timing->from(), _timing->until()); + auto p = kdm_for_dkdm_recipient(film, _cpl->cpl(), i); if (p) { kdms.push_back (p); } diff --git a/src/wx/dkdm_dialog.h b/src/wx/dkdm_dialog.h index 4a47d961f..fb3dbf903 100644 --- a/src/wx/dkdm_dialog.h +++ b/src/wx/dkdm_dialog.h @@ -30,7 +30,6 @@ LIBDCP_ENABLE_WARNINGS class DKDMOutputPanel; class Film; class KDMCPLPanel; -class KDMTimingPanel; class RecipientsPanel; class ScreensPanel; struct CPLSummary; @@ -48,7 +47,6 @@ private: std::weak_ptr<const Film> _film; RecipientsPanel* _recipients; - KDMTimingPanel* _timing; KDMCPLPanel* _cpl; DKDMOutputPanel* _output; wxButton* _make; diff --git a/src/wx/dkdm_output_panel.cc b/src/wx/dkdm_output_panel.cc index 495078a0e..f47639f35 100644 --- a/src/wx/dkdm_output_panel.cc +++ b/src/wx/dkdm_output_panel.cc @@ -65,12 +65,8 @@ DKDMOutputPanel::DKDMOutputPanel(wxWindow* parent) add_label_to_sizer(table, this, _("Filename format"), true, 0, wxALIGN_TOP | wxTOP | wxLEFT | wxRIGHT); dcp::NameFormat::Map titles; titles['f'] = wx_to_std(_("film name")); - titles['b'] = wx_to_std(_("from date/time")); - titles['e'] = wx_to_std(_("to date/time")); dcp::NameFormat::Map ex; ex['f'] = "Bambi"; - ex['b'] = "2012/03/15 12:30"; - ex['e'] = "2012/03/22 02:30"; _filename_format = new NameFormatEditor(this, Config::instance()->dkdm_filename_format(), titles, ex, ".xml"); table->Add(_filename_format->panel(), 1, wxEXPAND); |
