diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-01-31 17:04:18 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-01-31 17:04:18 +0000 |
| commit | 9fa17d52810490359f899cc0cbdb4c25ac74bc92 (patch) | |
| tree | 6e23785f15a9438d884af3a174bdb966e69f7a8c /src/lib/film.cc | |
| parent | 2eeb503962f31665a19bee24e2e46840f7086f33 (diff) | |
Check consistency of refer-to-DCP settings after adding content (#1456).
Diffstat (limited to 'src/lib/film.cc')
| -rw-r--r-- | src/lib/film.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index f4745d099..e7861a032 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1220,6 +1220,31 @@ Film::playlist_change (ChangeType type) { signal_change (type, CONTENT); signal_change (type, NAME); + + if (type == CHANGE_TYPE_DONE) { + /* Check that this change hasn't made our settings inconsistent */ + bool change_made = false; + BOOST_FOREACH (shared_ptr<Content> i, content()) { + shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i); + if (!d) { + continue; + } + + string why_not; + if (d->reference_video() && !d->can_reference_video(shared_from_this(), why_not)) { + d->set_reference_video(false); + change_made = true; + } + if (d->reference_audio() && !d->can_reference_audio(shared_from_this(), why_not)) { + d->set_reference_audio(false); + change_made = true; + } + } + + if (change_made) { + Message (_("DCP-o-matic had to change your settings for referring to DCPs as OV. Please review those settings to make sure they are what you want.")); + } + } } void |
