Make the DCP-encode counting dependent on variant.
authorCarl Hetherington <cth@carlh.net>
Fri, 31 May 2024 08:59:48 +0000 (10:59 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 31 May 2024 08:59:54 +0000 (10:59 +0200)
src/lib/transcode_job.cc
src/lib/variant.cc
src/lib/variant.h

index 98c6784a9bbdaadbb7c82f0901ec2e2bb6f01f94..f1373fb4a71bea0df561b5781f4f92ce8b5cc99c 100644 (file)
@@ -133,7 +133,7 @@ TranscodeJob::run ()
 
                LOG_GENERAL(N_("Transcode job completed successfully: %1 fps"), dcp::locale_convert<string>(frames_per_second(), 2, true));
 
-               if (dynamic_pointer_cast<DCPFilmEncoder>(_encoder)) {
+               if (variant::count_created_dcps() && dynamic_pointer_cast<DCPFilmEncoder>(_encoder)) {
                        try {
                                Analytics::instance()->successful_dcp_encode();
                        } catch (FileError& e) {
index 3ccd84d8232e8242b28c665b1f1e1d496cfc950c..9b12d753d2de39b55d8d8e3475de76a59f53232a 100644 (file)
@@ -41,6 +41,7 @@ static char const* _report_problem_email = "carl@dcpomatic.com";
 static bool const _show_tagline = true;
 static bool const _show_dcpomatic_website = true;
 static bool const _show_report_a_problem = true;
+static bool const _count_created_dcps = true;
 
 
 std::string
@@ -157,6 +158,12 @@ variant::show_report_a_problem()
        return _show_report_a_problem;
 }
 
+bool
+variant::count_created_dcps()
+{
+       return _count_created_dcps;
+}
+
 std::string
 variant::report_problem_email()
 {
index 2738f16fc0b1d4ed1319ce31132ef9b950e48903..b69b5ba3846869195cd13bb8f20de8d9dbaecd89 100644 (file)
@@ -49,6 +49,7 @@ std::string report_problem_email();
 bool show_tagline();
 bool show_dcpomatic_website();
 bool show_report_a_problem();
+bool count_created_dcps();
 
 }