diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-07-15 02:19:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-07-15 11:10:47 +0200 |
| commit | 847daf7ec0f741eb6d50638c2096743ee731634c (patch) | |
| tree | 8fba9c9571d0579151dcca8876cd22c5062825e6 /src/wx/content_view.cc | |
| parent | 66a6aea50054a5af8624c7d36949c642f4c8b619 (diff) | |
Change ExamineContentJob to take a vector of content.
Diffstat (limited to 'src/wx/content_view.cc')
| -rw-r--r-- | src/wx/content_view.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc index fa6bd64dc..0bbc80535 100644 --- a/src/wx/content_view.cc +++ b/src/wx/content_view.cc @@ -48,6 +48,7 @@ using std::list; using std::make_shared; using std::shared_ptr; using std::string; +using std::vector; using std::weak_ptr; using boost::optional; using namespace dcpomatic; @@ -109,7 +110,7 @@ ContentView::update () } if (content) { - auto job = make_shared<ExamineContentJob>(shared_ptr<Film>(), content, false); + auto job = make_shared<ExamineContentJob>(shared_ptr<Film>(), vector<shared_ptr<Content>>{content}, false); jm->add (job); jobs.push_back (job); } @@ -136,16 +137,18 @@ ContentView::update () if (i->finished_in_error()) { error_dialog(this, std_to_wx(i->error_summary()) + char_to_wx(".\n"), std_to_wx(i->error_details())); } else { - if (auto dcp = dynamic_pointer_cast<DCPContent>(i->content())) { - for (auto cpl: dcp::find_and_resolve_cpls(dcp->directories(), true)) { - auto copy = dynamic_pointer_cast<DCPContent>(dcp->clone()); - copy->set_cpl(cpl->id()); - add(copy); - _content.push_back(copy); + for (auto c: i->content()) { + if (auto dcp = dynamic_pointer_cast<DCPContent>(c)) { + for (auto cpl: dcp::find_and_resolve_cpls(dcp->directories(), true)) { + auto copy = dynamic_pointer_cast<DCPContent>(dcp->clone()); + copy->set_cpl(cpl->id()); + add(copy); + _content.push_back(copy); + } + } else { + add(c); + _content.push_back(c); } - } else { - add(i->content()); - _content.push_back(i->content()); } } } |
