Add $CINEMA_SHORT_NAME variable in KDM emails.
authorCarl Hetherington <cth@carlh.net>
Sat, 19 Mar 2022 18:43:31 +0000 (19:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 19 Mar 2022 18:43:31 +0000 (19:43 +0100)
doc/manual/dcpomatic.xml
src/lib/kdm_with_metadata.cc

index 4c31128fee7a2928289ad6a9d7d15576e98d7ffa..88c4b984b041a11a6ef8a8f3a4dd2a29d2bd77e0 100644 (file)
@@ -2935,6 +2935,9 @@ KDM that is being sent; these strings are shown in <xref linkend="tab-kdm-magic"
 <entry><code>$CINEMA_NAME</code></entry><entry>Cinema name</entry>
 </row>
 <row>
+<entry><code>$CINEMA_SHORT_NAME</code></entry><entry>First 14 characters of the cinema name</entry>
+</row>
+<row>
 <entry><code>$SCREENS</code></entry><entry>Name of screen or screens that KDMs are being generated for</entry>
 </row>
 <row>
index 716d29d9c49495b5b27b4bbfb4f9afc6b73fa31a..857fdca2c01c9590373c4fa286fd641cb0bf3562 100644 (file)
@@ -225,6 +225,7 @@ send_emails (
                        boost::algorithm::replace_all (target, "$START_TIME", i.front()->get('b').get_value_or(""));
                        boost::algorithm::replace_all (target, "$END_TIME", i.front()->get('e').get_value_or(""));
                        boost::algorithm::replace_all (target, "$CINEMA_NAME", i.front()->get('c').get_value_or(""));
+                       boost::algorithm::replace_all (target, "$CINEMA_SHORT_NAME", i.front()->get('c').get_value_or("").substr(0, 14));
                        return target;
                };