Don't try to upload to TMS after export.
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Apr 2019 11:45:17 +0000 (12:45 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 25 Apr 2019 11:45:17 +0000 (12:45 +0100)
src/lib/transcode_job.cc

index 6aa31af978d1407b4c61bc2f4c8d5f0f8fb91b78..1db37e3708b27748ada7455763a2c753e63e30f6 100644 (file)
@@ -96,14 +96,14 @@ TranscodeJob::run ()
                        Analytics::instance()->successful_dcp_encode();
                }
 
-               _encoder.reset ();
-
                /* XXX: this shouldn't be here */
-               if (_film->upload_after_make_dcp ()) {
+               if (_film->upload_after_make_dcp() && dynamic_pointer_cast<DCPEncoder>(_encoder)) {
                        shared_ptr<Job> job (new UploadJob (_film));
                        JobManager::instance()->add (job);
                }
 
+               _encoder.reset ();
+
        } catch (...) {
                _encoder.reset ();
                throw;