diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-06-17 22:35:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-07-03 22:46:34 +0200 |
| commit | d4019480147bd6b478f8b067982c53251e5d6f15 (patch) | |
| tree | 9cf10f9655b7ef332d3362da32eba4000cd1fe4d /src/lib/spl.cc | |
| parent | b4c7d661a2c7b072d18e82129ff0a31a99ba5081 (diff) | |
Add all DCP CPLs to the content list, and write CPL ID to SPLs instead of digest (#3040).
Diffstat (limited to 'src/lib/spl.cc')
| -rw-r--r-- | src/lib/spl.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/spl.cc b/src/lib/spl.cc index 615dd916a..ff37e5cbf 100644 --- a/src/lib/spl.cc +++ b/src/lib/spl.cc @@ -45,11 +45,18 @@ SPL::read (boost::filesystem::path path, ContentStore* store) _id = doc.string_child("Id"); _name = doc.string_child("Name"); for (auto i: doc.node_children("Entry")) { - auto c = store->get(i->string_child("Digest")); - if (c) { - add (SPLEntry(c)); + if (auto cpl = i->optional_string_child("CPL")) { + if (auto c = store->get_by_cpl_id(*cpl)) { + add(SPLEntry(c)); + } else { + _missing = true; + } } else { - _missing = true; + if (auto c = store->get_by_digest(i->string_child("Digest"))) { + add(SPLEntry(c)); + } else { + _missing = true; + } } } } |
