2013-12-23 Carl Hetherington <cth@carlh.net>
+ * Add $START_TIME and $END_TIME as variables for the KDM email.
+
* Add top/bottom option for 3D frames.
2013-12-20 Carl Hetherington <cth@carlh.net>
, _default_j2k_bandwidth (200000000)
, _default_audio_delay (0)
, _kdm_email (
- "Dear Projectionist\n\nPlease find attached KDMs for $CPL_NAME.\n\nBest regards,\nDCP-o-matic"
+ "Dear Projectionist\n\nPlease find attached KDMs for $CPL_NAME.\n\nThe KDMs are valid from $START_TIME until $END_TIME.\n\nBest regards,\nDCP-o-matic"
)
{
_allowed_dcp_frame_rates.push_back (24);
using std::list;
using std::string;
+using std::stringstream;
using boost::shared_ptr;
struct ScreenKDM
quickmail_add_to (mail, i->cinema->email.c_str ());
string body = Config::instance()->kdm_email().c_str();
- boost::algorithm::replace_all (body, "$DCP_NAME", film->dcp_name ());
-
+ boost::algorithm::replace_all (body, "$CPL_NAME", film->dcp_name ());
+ stringstream start;
+ start << from.date() << " " << from.time_of_day();
+ boost::algorithm::replace_all (body, "$START_TIME", start.str ());
+ stringstream end;
+ end << to.date() << " " << to.time_of_day();
+ boost::algorithm::replace_all (body, "$END_TIME", end.str ());
+
quickmail_set_body (mail, body.c_str());
quickmail_add_attachment_file (mail, zip_file.string().c_str(), "application/zip");
char const* error = quickmail_send (mail, Config::instance()->mail_server().c_str(), 25, "", "");
if (error) {
quickmail_destroy (mail);
- throw StringError (String::compose ("Failed to send KDM email (%1)", error));
+ throw KDMError (String::compose ("Failed to send KDM email (%1)", error));
}
quickmail_destroy (mail);
}