summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-30 23:28:29 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commitd7f52153b4e50858dcd382fb66c51afba0bf6029 (patch)
tree69fb67247e6f72adfa3a4c53e30c011ab0446d9c
parent426c98459c8aad043d42535c0b36300c7dc63215 (diff)
DUPLICATE_ASSET_ID_IN_PKL: note -> pkl_id.
-rw-r--r--src/verify.cc4
-rw-r--r--src/verify.h2
-rw-r--r--test/verify_test.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 0c993fd5..caf2db03 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1820,7 +1820,7 @@ verify_pkl(Context& context, shared_ptr<const PKL> pkl)
set<string> uuid_set;
for (auto asset: pkl->assets()) {
if (!uuid_set.insert(asset->id()).second) {
- context.add_note(VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL, pkl->id(), pkl->file().get());
+ context.add_note(VerificationNote(VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL, pkl->file().get()).set_pkl_id(pkl->id()));
break;
}
}
@@ -2179,7 +2179,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA:
return compose("<MainPictureActiveaArea> %1x%2 is valid", note.size_in_pixels()->width, note.size_in_pixels()->height);
case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL:
- return compose("The PKL %1 has more than one asset with the same ID.", note.note().get());
+ return compose("The PKL %1 has more than one asset with the same ID.", *note.pkl_id());
case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_ASSETMAP:
return compose("The ASSETMAP %1 has more than one asset with the same ID.", note.note().get());
case VerificationNote::Code::MISSING_SUBTITLE:
diff --git a/src/verify.h b/src/verify.h
index 6d93384a..07a480a7 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -510,7 +510,7 @@ public:
*/
VALID_MAIN_PICTURE_ACTIVE_AREA,
/** A PKL has more than one asset with the same ID
- * note contains the PKL ID
+ * pkl_id contains the PKL ID
* file contains the PKL filename
*/
DUPLICATE_ASSET_ID_IN_PKL,
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 7e2ed3e7..87e57b71 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -5150,7 +5150,7 @@ BOOST_AUTO_TEST_CASE(verify_duplicate_pkl_asset_ids)
VN(VC::VALID_CPL_ANNOTATION_TEXT).set_cpl_id(cpl->id()).set_annotation_text("A Test DCP"),
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
note(VC::NONE_ENCRYPTED, cpl),
- { VC::DUPLICATE_ASSET_ID_IN_PKL, pkl.id(), canonical(find_pkl(dir)) },
+ VN(VC::DUPLICATE_ASSET_ID_IN_PKL, canonical(find_pkl(dir))).set_pkl_id(pkl.id()),
});
}