diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-21 12:24:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-21 12:24:59 +0100 |
| commit | 5b17eb3a0b0f95417c210ac3f7c3b66b5eac483c (patch) | |
| tree | 0beda7d8d246b36c359a60cf9d6a233e5d6d58b1 /src/tools | |
| parent | 5911030f411e104778ad2c3faca8c8cb7bdbc387 (diff) | |
Missing frames treated as bad on check hashes. Try to stop running makedcp if jobs fail.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/makedcp.cc | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/tools/makedcp.cc b/src/tools/makedcp.cc index 71a07fe71..23b68148d 100644 --- a/src/tools/makedcp.cc +++ b/src/tools/makedcp.cc @@ -164,9 +164,9 @@ main (int argc, char* argv[]) film->make_dcp (true); - bool all_done = false; + bool should_stop = false; bool first = true; - while (!all_done) { + while (!should_stop) { dvdomatic_sleep (5); @@ -178,8 +178,10 @@ main (int argc, char* argv[]) } first = false; - - all_done = true; + + int unfinished = 0; + int finished_in_error = 0; + for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) { if (progress) { cout << (*i)->name() << ": "; @@ -192,9 +194,15 @@ main (int argc, char* argv[]) cout << ": Running \n"; } } - + if (!(*i)->finished ()) { - all_done = false; + cout << (*i)->name() << " not finished.\n"; + ++unfinished; + } + + if ((*i)->finished_in_error ()) { + cout << (*i)->name() << " finished in error.\n"; + ++finished_in_error; } if (!progress && (*i)->finished_in_error ()) { @@ -204,6 +212,10 @@ main (int argc, char* argv[]) cout << (*i)->status() << "\n"; } } + + if (unfinished == 0 || finished_in_error != 0) { + should_stop = true; + } } return 0; |
