X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcheck_content_change_job.cc;h=468933ae496169a1601672bb527db6a01bdad4a3;hb=cf693669efd43c0ac565c61a074a1c7f0290921e;hp=0862ab085323eaac5966b34358b0760a1d5ebf5b;hpb=f968fb875135884b0551195edc2315d4be76d5bc;p=dcpomatic.git diff --git a/src/lib/check_content_change_job.cc b/src/lib/check_content_change_job.cc index 0862ab085..468933ae4 100644 --- a/src/lib/check_content_change_job.cc +++ b/src/lib/check_content_change_job.cc @@ -33,8 +33,9 @@ using std::list; using std::cout; using boost::shared_ptr; -CheckContentChangeJob::CheckContentChangeJob (shared_ptr film) +CheckContentChangeJob::CheckContentChangeJob (shared_ptr film, shared_ptr following) : Job (film) + , _following (following) { } @@ -42,7 +43,7 @@ CheckContentChangeJob::CheckContentChangeJob (shared_ptr film) string CheckContentChangeJob::name () const { - return _("Check content for changes"); + return _("Checking content for changes"); } string @@ -61,19 +62,15 @@ CheckContentChangeJob::run () BOOST_FOREACH (shared_ptr i, _film->content()) { bool ic = false; for (size_t j = 0; j < i->number_of_paths(); ++j) { - cout << boost::filesystem::last_write_time(i->path(j)) << " " << i->last_write_time(j) << "\n"; if (boost::filesystem::last_write_time(i->path(j)) != i->last_write_time(j)) { - cout << "last write differs.\n"; ic = true; break; } } if (!ic && i->calculate_digest() != i->digest()) { - cout << "digest differs.\n"; ic = true; } if (ic) { - cout << i->path(0) << " changed.\n"; changed.push_back (i); } } @@ -84,4 +81,16 @@ CheckContentChangeJob::run () set_progress (1); set_state (FINISHED_OK); + + if (!changed.empty()) { + string m = _("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings."); + if (_following) { + /* I'm assuming that _following is a make DCP job */ + m += " "; + m += _("Choose 'Make DCP' again when you have done this."); + } + set_message (m); + } else if (_following) { + JobManager::instance()->add (_following); + } }