Add OK note when CPL has valid annotation text.
authorCarl Hetherington <cth@carlh.net>
Sun, 7 Jan 2024 23:35:29 +0000 (00:35 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:22:08 +0000 (17:22 +0200)
src/verify.cc
src/verify.h

index 7aa28b436760254ca587bf50d2c75c29ad712d73..a59ce82b1f6db9b18beddf27c514963bdf702988 100644 (file)
@@ -1603,6 +1603,8 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
                        context.bv21_error(VerificationNote::Code::MISSING_CPL_ANNOTATION_TEXT, cpl->file().get());
                } else if (cpl->annotation_text().get() != cpl->content_title_text()) {
                        context.warning(VerificationNote::Code::MISMATCHED_CPL_ANNOTATION_TEXT, cpl->file().get());
+               } else {
+                       context.ok(VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, cpl->annotation_text().get());
                }
        }
 
@@ -2047,6 +2049,8 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
                return compose("The CPL %1 has no <AnnotationText> tag.", note.cpl_id().get());
        case VerificationNote::Code::MISMATCHED_CPL_ANNOTATION_TEXT:
                return compose("The CPL %1 has an <AnnotationText> which differs from its <ContentTitleText>.", note.cpl_id().get());
+       case VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT:
+               return compose("Valid CPL annotation text %1", note.note().get());
        case VerificationNote::Code::MISMATCHED_ASSET_DURATION:
                return process_string("All assets in a reel do not have the same duration.");
        case VerificationNote::Code::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS:
index 24ada64d5617510a547628f8f1c66d7c724289ce..b0cf0b4a68122525d4683b0e9d2b76b0a6dbba0e 100644 (file)
@@ -265,6 +265,7 @@ public:
                 *  file contains the CPL filename
                 */
                MISMATCHED_CPL_ANNOTATION_TEXT,
+               VALID_CPL_ANNOTATION_TEXT,
                /** At least one asset in a reel does not have the same duration as the others */
                MISMATCHED_ASSET_DURATION,
                /** If one reel has a _MainSubtitle_, all must have them */