summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-03-10 23:00:43 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-16 14:25:54 +0100
commitd5d9e143a5778928c5f386a7bd9cb140d4f1191a (patch)
treebca526b206d8b1e71f302a71ee2b81986e5d76ba /src
parentf90bd4d97be25b3bca6b4523864896f5ff7b7e53 (diff)
Make the value used for 'f' in KDM names consistent (#1657).
Before it was mostly the film name, but this is confusing when a single film contains multiple CPLs.
Diffstat (limited to 'src')
-rw-r--r--src/lib/dkdm_recipient.cc2
-rw-r--r--src/lib/film.cc1
-rw-r--r--src/lib/film.h4
-rw-r--r--src/lib/kdm_cli.cc2
-rw-r--r--src/lib/screen.cc2
-rw-r--r--src/tools/dcpomatic_kdm.cc2
-rw-r--r--src/wx/kdm_output_panel.h1
7 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/dkdm_recipient.cc b/src/lib/dkdm_recipient.cc
index 30c307569..b15487c8a 100644
--- a/src/lib/dkdm_recipient.cc
+++ b/src/lib/dkdm_recipient.cc
@@ -86,7 +86,7 @@ kdm_for_dkdm_recipient (
);
dcp::NameFormat::Map name_values;
- name_values['f'] = film->name();
+ name_values['f'] = kdm.content_title_text();
name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
name_values['e'] = end.date() + " " + end.time_of_day(true, false);
name_values['i'] = kdm.cpl_id();
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 5e99e466c..d9ed8c530 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1283,6 +1283,7 @@ Film::set_isdcf_date_today ()
_isdcf_date = boost::gregorian::day_clock::local_day ();
}
+
boost::filesystem::path
Film::j2c_path (int reel, Frame frame, Eyes eyes, bool tmp) const
{
diff --git a/src/lib/film.h b/src/lib/film.h
index a1bec3d53..55bbb4069 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -409,6 +409,10 @@ public:
return _luminance;
}
+ boost::gregorian::date isdcf_date () const {
+ return _isdcf_date;
+ }
+
/* SET */
diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc
index 0ec648e04..e89da6e37 100644
--- a/src/lib/kdm_cli.cc
+++ b/src/lib/kdm_cli.cc
@@ -374,7 +374,7 @@ from_dkdm (
dcp::NameFormat::Map name_values;
name_values['c'] = i->cinema ? i->cinema->name : "";
name_values['s'] = i->name;
- name_values['f'] = dkdm.annotation_text().get_value_or("");
+ name_values['f'] = kdm.content_title_text();
name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
name_values['e'] = end.date() + " " + end.time_of_day(true, false);
name_values['i'] = kdm.cpl_id();
diff --git a/src/lib/screen.cc b/src/lib/screen.cc
index 21d7ebf25..a9291e8f0 100644
--- a/src/lib/screen.cc
+++ b/src/lib/screen.cc
@@ -109,7 +109,7 @@ kdm_for_screen (
name_values['c'] = "";
}
name_values['s'] = screen->name;
- name_values['f'] = film->name();
+ name_values['f'] = kdm.content_title_text();
name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
name_values['e'] = end.date() + " " + end.time_of_day(true, false);
name_values['i'] = kdm.cpl_id();
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 9a65314e5..24bd3b4d7 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -338,7 +338,7 @@ private:
begin,
end,
decrypted.annotation_text().get_value_or (""),
- decrypted.content_title_text(),
+ title,
dcp::LocalTime().as_string()
);
diff --git a/src/wx/kdm_output_panel.h b/src/wx/kdm_output_panel.h
index f831fdce0..0025b0072 100644
--- a/src/wx/kdm_output_panel.h
+++ b/src/wx/kdm_output_panel.h
@@ -20,6 +20,7 @@
#include "lib/kdm_with_metadata.h"
+#include "wx_util.h"
#include <dcp/types.h>
#include <wx/wx.h>
#include <boost/filesystem.hpp>