diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-19 19:43:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-19 19:43:31 +0100 |
| commit | 96c7c48da7e7c2b661f28be4ff454b84d0173801 (patch) | |
| tree | 89a42849124ea57609d11ef487acbd949cee4f96 | |
| parent | 37781c996059c6ccf5e9456556e515f12c6eb814 (diff) | |
Add $CINEMA_SHORT_NAME variable in KDM emails.
| -rw-r--r-- | doc/manual/dcpomatic.xml | 3 | ||||
| -rw-r--r-- | src/lib/kdm_with_metadata.cc | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/doc/manual/dcpomatic.xml b/doc/manual/dcpomatic.xml index 4c31128fe..88c4b984b 100644 --- a/doc/manual/dcpomatic.xml +++ b/doc/manual/dcpomatic.xml @@ -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> diff --git a/src/lib/kdm_with_metadata.cc b/src/lib/kdm_with_metadata.cc index 716d29d9c..857fdca2c 100644 --- a/src/lib/kdm_with_metadata.cc +++ b/src/lib/kdm_with_metadata.cc @@ -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; }; |
