Hand-apply 6a3cd511559433554ab40ed72ff94b7d8dc2c5bd from master;
[dcpomatic.git] / src / lib / film.cc
index 26810992175d8da91065dfc4052d7da424afa0a2..22dc0ca90ef2e176d6bc9672d6baa608e16824f4 100644 (file)
@@ -467,6 +467,9 @@ Film::read_metadata ()
        /* This method is the only one that can return notes (so far) */
        _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version, notes);
 
+       /* Write backtraces to this film's directory, until another film is loaded */
+       set_backtrace_file (file ("backtrace.txt"));
+
        _dirty = false;
        return notes;
 }
@@ -945,20 +948,20 @@ Film::content () const
 }
 
 void
-Film::examine_content (shared_ptr<Content> c)
+Film::examine_content (shared_ptr<Content> c, bool calculate_digest)
 {
-       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
+       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
        JobManager::instance()->add (j);
 }
 
 void
-Film::examine_and_add_content (shared_ptr<Content> c)
+Film::examine_and_add_content (shared_ptr<Content> c, bool calculate_digest)
 {
        if (dynamic_pointer_cast<FFmpegContent> (c)) {
                run_ffprobe (c->path(0), file ("ffprobe.log"), _log);
        }
                        
-       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
+       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
        j->Finished.connect (bind (&Film::maybe_add_content, this, boost::weak_ptr<Job> (j), boost::weak_ptr<Content> (c)));
        JobManager::instance()->add (j);
 }