diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-20 21:22:17 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-03 21:37:04 +0100 |
| commit | eda0b0b0ffecf2d6d67407303a1bd45659ccdfce (patch) | |
| tree | c57cda863071ca7af8de20ac9bce128b45d93289 /src/tools | |
| parent | 9b841fddd3aa4a1117b03299bce964c5e4b205d9 (diff) | |
Replace find_and_resolve_cpls() with storing all CPL IDs in DCPContent (sometimes).
In some places we need other details than the ID, but in lots of places
this saves some disk searching.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 30a8d1071..b4425fe25 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -549,8 +549,7 @@ public: if (_film->content().size() == 1) { /* Offer a CPL menu */ - auto first = dynamic_pointer_cast<DCPContent>(_film->content().front()); - if (first) { + if (auto first = dynamic_pointer_cast<DCPContent>(_film->content().front())) { int id = ID_view_cpl; for (auto i: dcp::find_and_resolve_cpls(first->directories(), true)) { auto j = _cpl_menu->AppendRadioItem( @@ -916,7 +915,7 @@ private: { auto dcp = std::dynamic_pointer_cast<DCPContent>(_film->content().front()); DCPOMATIC_ASSERT(dcp); - auto cpls = dcp::find_and_resolve_cpls(dcp->directories(), true); + auto cpls = dcp->cpls(); int id = ev.GetId() - ID_view_cpl; DCPOMATIC_ASSERT(id >= 0); DCPOMATIC_ASSERT(id < int(cpls.size())); @@ -927,7 +926,7 @@ private: } _viewer.set_coalesce_player_changes(true); - dcp->set_cpl((*i)->id()); + dcp->set_cpl(*i); examine_content(); _viewer.set_coalesce_player_changes(false); |
