Rename some variables and re-implement collect().
[dcpomatic.git] / src / tools / dcpomatic_kdm_cli.cc
index dd7fc82e3e92cada7037e52be7e264d8fe59c004..ec49723a8fcdf71892837da62d4d13de5fab5ae8 100644 (file)
@@ -25,7 +25,6 @@
 #include "lib/film.h"
 #include "lib/cinema.h"
 #include "lib/kdm_with_metadata.h"
-#include "lib/cinema_kdms.h"
 #include "lib/config.h"
 #include "lib/exceptions.h"
 #include "lib/emailer.h"
@@ -130,7 +129,7 @@ always_overwrite ()
 
 void
 write_files (
-       list<KDMWithMetadataPtr> screen_kdms,
+       list<KDMWithMetadataPtr> kdms,
        bool zip,
        boost::filesystem::path output,
        dcp::NameFormat container_name_format,
@@ -140,8 +139,8 @@ write_files (
        )
 {
        if (zip) {
-               int const N = CinemaKDMs::write_zip_files (
-                       CinemaKDMs::collect (screen_kdms),
+               int const N = write_zip_files (
+                       collect (kdms),
                        output,
                        container_name_format,
                        filename_format,
@@ -154,7 +153,7 @@ write_files (
                }
        } else {
                int const N = write_files (
-                       screen_kdms, output, filename_format, values,
+                       kdms, output, filename_format, values,
                        bind (&always_overwrite)
                        );
 
@@ -349,7 +348,7 @@ from_dkdm (
        values['e'] = dcp::LocalTime(valid_to).date() + " " + dcp::LocalTime(valid_to).time_of_day(true, false);
 
        try {
-               list<KDMWithMetadataPtr> screen_kdms;
+               list<KDMWithMetadataPtr> kdms;
                BOOST_FOREACH (shared_ptr<Screen> i, screens) {
                        if (!i->recipient) {
                                continue;
@@ -359,7 +358,7 @@ from_dkdm (
                        name_values['c'] = i->cinema->name;
                        name_values['s'] = i->name;
 
-                       screen_kdms.push_back (
+                       kdms.push_back (
                                KDMWithMetadataPtr(
                                        new DCPKDMWithMetadata(
                                                name_values,
@@ -378,7 +377,7 @@ from_dkdm (
                                        )
                                );
                }
-               write_files (screen_kdms, zip, output, container_name_format, filename_format, values, verbose);
+               write_files (kdms, zip, output, container_name_format, filename_format, values, verbose);
        } catch (FileError& e) {
                cerr << program_name << ": " << e.what() << " (" << e.file().string() << ")\n";
                exit (EXIT_FAILURE);