summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic_kdm.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-05-05 15:08:50 +0200
committerCarl Hetherington <cth@carlh.net>2020-05-05 15:08:50 +0200
commit16dc75e9fb6510b28d7f1518e8ddd289b036bb3b (patch)
tree310880e9720cec31b8493ac8bd50cc12318dbfdd /src/tools/dcpomatic_kdm.cc
parent1cfff878699df9c27a96f16101cc949038ebfcc5 (diff)
Write 'f', 'b' and 'e' tags into all KDMWithMetadata when they are made.
Diffstat (limited to 'src/tools/dcpomatic_kdm.cc')
-rw-r--r--src/tools/dcpomatic_kdm.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index dd45401cb..8ff34db7b 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -317,17 +317,23 @@ private:
continue;
}
+ dcp::LocalTime begin(_timing->from(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute());
+ dcp::LocalTime end(_timing->until(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute());
+
DecryptedECinemaKDM kdm (
decrypted.id(),
decrypted.name(),
decrypted.key(),
- dcp::LocalTime (_timing->from(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()),
- dcp::LocalTime (_timing->until(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute())
+ begin,
+ end
);
dcp::NameFormat::Map name_values;
name_values['c'] = i->cinema->name;
name_values['s'] = i->name;
+ name_values['f'] = title;
+ name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
+ name_values['e'] = end.date() + " " + end.time_of_day(true, false);
/* Encrypt */
kdms.push_back (
@@ -358,10 +364,13 @@ private:
continue;
}
+ dcp::LocalTime begin(_timing->from(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute());
+ dcp::LocalTime end(_timing->until(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute());
+
/* Make an empty KDM */
dcp::DecryptedKDM kdm (
- dcp::LocalTime (_timing->from(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()),
- dcp::LocalTime (_timing->until(), i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()),
+ begin,
+ end,
decrypted.annotation_text().get_value_or (""),
decrypted.content_title_text(),
dcp::LocalTime().as_string()
@@ -375,6 +384,9 @@ private:
dcp::NameFormat::Map name_values;
name_values['c'] = i->cinema->name;
name_values['s'] = i->name;
+ name_values['f'] = title;
+ name_values['b'] = begin.date() + " " + begin.time_of_day(true, false);
+ name_values['e'] = end.date() + " " + end.time_of_day(true, false);
/* Encrypt */
kdms.push_back (