Add option to analyse audio automatically when content is added (#673).
[dcpomatic.git] / src / tools / dcpomatic.cc
index 1ab316fec73a055ae83c2b0354b1220a9dfc0fa3..5abf47182a89a46e44dc131256c4678b062cffcb 100644 (file)
 #include "lib/signal_manager.h"
 #include "lib/log.h"
 #include "lib/job_manager.h"
-#include "lib/transcode_job.h"
 #include "lib/exceptions.h"
 #include "lib/cinema.h"
 #include "lib/kdm.h"
 #include "lib/send_kdm_email_job.h"
 #include "lib/server_finder.h"
-#include "lib/update.h"
+#include "lib/update_checker.h"
 #include "lib/cross.h"
 #include "lib/content_factory.h"
 #include "lib/compose.hpp"
@@ -606,7 +605,7 @@ private:
        {
                list<shared_ptr<Job> > jobs = JobManager::instance()->get ();
                list<shared_ptr<Job> >::iterator i = jobs.begin();
-               while (i != jobs.end() && dynamic_pointer_cast<TranscodeJob> (*i) == 0) {
+               while (i != jobs.end() && (*i)->json_name() != "transcode") {
                        ++i;
                }
                bool const dcp_creation = (i != jobs.end ()) && !(*i)->finished ();
@@ -798,13 +797,17 @@ private:
                wxInitAllImageHandlers ();
 
                wxSplashScreen* splash = 0;
-               if (!Config::have_existing ()) {
-                       wxBitmap bitmap;
-                       boost::filesystem::path p = shared_path () / "splash.png";
-                       if (bitmap.LoadFile (std_to_wx (p.string ()), wxBITMAP_TYPE_PNG)) {
-                               splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
-                               wxYield ();
+               try {
+                       if (!Config::have_existing ()) {
+                               wxBitmap bitmap;
+                               boost::filesystem::path p = shared_path () / "splash.png";
+                               if (bitmap.LoadFile (std_to_wx (p.string ()), wxBITMAP_TYPE_PNG)) {
+                                       splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
+                                       wxYield ();
+                               }
                        }
+               } catch (boost::filesystem::filesystem_error& e) {
+                       /* Maybe we couldn't find the splash image; never mind */
                }
 
                SetAppName (_("DCP-o-matic"));