-make_zip_file (CinemaKDMs kdms, boost::filesystem::path zip_file, dcp::NameFormat name_format, dcp::NameFormat::Map name_values)
+make_zip_file (list<KDMWithMetadataPtr> kdms, boost::filesystem::path zip_file, dcp::NameFormat name_format, dcp::NameFormat::Map name_values)
name_values['i'] = i->kdm_id ();
string const name = careful_string_filter(name_format.get(name_values, ".xml"));
zipper.add (name, i->kdm_as_xml());
name_values['i'] = i->kdm_id ();
string const name = careful_string_filter(name_format.get(name_values, ".xml"));
zipper.add (name, i->kdm_as_xml());
boost::filesystem::path directory,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
boost::filesystem::path directory,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
path /= container_name_format.get(name_values, "");
if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
boost::filesystem::create_directories (path);
path /= container_name_format.get(name_values, "");
if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
boost::filesystem::create_directories (path);
- write_files (i.screen_kdms, path, filename_format, name_values, confirm_overwrite);
+ write_files (i, path, filename_format, name_values, confirm_overwrite);
boost::filesystem::path directory,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
boost::filesystem::path directory,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
path /= container_name_format.get(name_values, ".zip");
if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
if (boost::filesystem::exists (path)) {
path /= container_name_format.get(name_values, ".zip");
if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
if (boost::filesystem::exists (path)) {
boost::filesystem::remove (path);
}
make_zip_file (i, path, filename_format, name_values);
boost::filesystem::remove (path);
}
make_zip_file (i, path, filename_format, name_values);
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
dcp::NameFormat::Map name_values,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
dcp::NameFormat::Map name_values,
boost::filesystem::path zip_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
boost::filesystem::create_directories (zip_file);
zip_file /= container_name_format.get(name_values, ".zip");
boost::filesystem::path zip_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
boost::filesystem::create_directories (zip_file);
zip_file /= container_name_format.get(name_values, ".zip");
boost::algorithm::replace_all (subject, "$CPL_NAME", cpl_name);
boost::algorithm::replace_all (subject, "$START_TIME", name_values['b']);
boost::algorithm::replace_all (subject, "$END_TIME", name_values['e']);
boost::algorithm::replace_all (subject, "$CPL_NAME", cpl_name);
boost::algorithm::replace_all (subject, "$START_TIME", name_values['b']);
boost::algorithm::replace_all (subject, "$END_TIME", name_values['e']);
string body = config->kdm_email().c_str();
boost::algorithm::replace_all (body, "$CPL_NAME", cpl_name);
boost::algorithm::replace_all (body, "$START_TIME", name_values['b']);
boost::algorithm::replace_all (body, "$END_TIME", name_values['e']);
string body = config->kdm_email().c_str();
boost::algorithm::replace_all (body, "$CPL_NAME", cpl_name);
boost::algorithm::replace_all (body, "$START_TIME", name_values['b']);
boost::algorithm::replace_all (body, "$END_TIME", name_values['e']);
optional<string> screen_name = j->get('n');
if (screen_name) {
screens += *screen_name + ", ";
optional<string> screen_name = j->get('n');
if (screen_name) {
screens += *screen_name + ", ";
}
boost::algorithm::replace_all (body, "$SCREENS", screens.substr (0, screens.length() - 2));
}
boost::algorithm::replace_all (body, "$SCREENS", screens.substr (0, screens.length() - 2));
- Emailer email (config->kdm_from(), i.cinema->emails, subject, body);
+ Emailer email (config->kdm_from(), i.front()->cinema()->emails, subject, body);