Remove in-place translations support.
[dcpomatic.git] / src / lib / kdm_cli.cc
index 5ea8089674c051377cd045afaf6cc8a95f6d7b12..2d3a021b5f5709368c2c46854ed561dbd24c8579 100644 (file)
@@ -27,7 +27,7 @@
 #include "cinema.h"
 #include "config.h"
 #include "dkdm_wrapper.h"
-#include "emailer.h"
+#include "email.h"
 #include "exceptions.h"
 #include "film.h"
 #include "kdm_with_metadata.h"
@@ -257,13 +257,21 @@ from_film (
                }
 
 
-               if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OUTSIDE_CERTIFICATE) != period_checks.end()) {
+               if (find_if(
+                       period_checks.begin(),
+                       period_checks.end(),
+                       [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OUTSIDE_CERTIFICATE; }
+                  ) != period_checks.end()) {
                        throw KDMCLIError(
                                "Some KDMs would have validity periods which are completely outside the recipient certificate periods.  Such KDMs are very unlikely to work, so will not be created."
                                );
                }
 
-               if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OVERLAPS_CERTIFICATE) != period_checks.end()) {
+               if (find_if(
+                       period_checks.begin(),
+                       period_checks.end(),
+                       [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OVERLAPS_CERTIFICATE; }
+                  ) != period_checks.end()) {
                        out("For some of these KDMs the recipient certificate's validity period will not cover the whole of the KDM validity period.  This might cause problems with the KDMs.");
                }
 
@@ -602,7 +610,7 @@ try
        if (list_cinemas) {
                auto cinemas = Config::instance()->cinemas ();
                for (auto i: cinemas) {
-                       out (String::compose("%1 (%2)", i->name, Emailer::address_list (i->emails)));
+                       out (String::compose("%1 (%2)", i->name, Email::address_list(i->emails)));
                }
                return {};
        }