X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcinema_kdms.cc;h=d96a95d7f7a96ede71df6e53879a089a406db35b;hb=aa382124eeabcad7a7346d46fb5f931c1364a849;hp=56b76d3f9ecdb5e9264647c7ce638e28384645ea;hpb=4e62980064496060af5a8c6ecab26ddf218aa63a;p=dcpomatic.git diff --git a/src/lib/cinema_kdms.cc b/src/lib/cinema_kdms.cc index 56b76d3f9..d96a95d7f 100644 --- a/src/lib/cinema_kdms.cc +++ b/src/lib/cinema_kdms.cc @@ -43,13 +43,13 @@ using boost::function; using boost::optional; void -CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, dcp::NameFormat name_format, dcp::NameFormat::Map name_values) const +make_zip_file (CinemaKDMs kdms, boost::filesystem::path zip_file, dcp::NameFormat name_format, dcp::NameFormat::Map name_values) { Zipper zipper (zip_file); - name_values['c'] = cinema->name; + name_values['c'] = kdms.cinema->name; - BOOST_FOREACH (KDMWithMetadataPtr i, screen_kdms) { + BOOST_FOREACH (KDMWithMetadataPtr i, kdms.screen_kdms) { 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()); @@ -62,7 +62,7 @@ CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, dcp::NameFormat nam * CinemaKDM contains the KDMs for its cinema. */ list -CinemaKDMs::collect (list screen_kdms) +collect (list screen_kdms) { list cinema_kdms; @@ -98,7 +98,7 @@ CinemaKDMs::collect (list screen_kdms) /** Write one directory per cinema into another directory */ int -CinemaKDMs::write_directories ( +write_directories ( list cinema_kdms, boost::filesystem::path directory, dcp::NameFormat container_name_format, @@ -128,7 +128,7 @@ CinemaKDMs::write_directories ( /** Write one ZIP file per cinema into a directory */ int -CinemaKDMs::write_zip_files ( +write_zip_files ( list cinema_kdms, boost::filesystem::path directory, dcp::NameFormat container_name_format, @@ -151,7 +151,7 @@ CinemaKDMs::write_zip_files ( /* Creating a new zip file over an existing one is an error */ boost::filesystem::remove (path); } - i.make_zip_file (path, filename_format, name_values); + make_zip_file (i, path, filename_format, name_values); written += i.screen_kdms.size(); } } @@ -167,7 +167,7 @@ CinemaKDMs::write_zip_files ( * @param cpl_name Name of the CPL that the KDMs are for. */ void -CinemaKDMs::email ( +email ( list cinema_kdms, dcp::NameFormat container_name_format, dcp::NameFormat filename_format, @@ -195,7 +195,7 @@ CinemaKDMs::email ( 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"); - i.make_zip_file (zip_file, filename_format, name_values); + make_zip_file (i, zip_file, filename_format, name_values); string subject = config->kdm_subject(); boost::algorithm::replace_all (subject, "$CPL_NAME", cpl_name);