Show hashes when they disagree during verification (#2717).
authorCarl Hetherington <cth@carlh.net>
Sat, 13 Jan 2024 00:01:09 +0000 (01:01 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Jan 2024 12:37:46 +0000 (13:37 +0100)
cscript
src/wx/verify_dcp_dialog.cc

diff --git a/cscript b/cscript
index 7ef3b1c0d46be7c2b954d3643ff8172249381a85..a3b7821fac9a2403977440de728dfe584ecb555e 100644 (file)
--- a/cscript
+++ b/cscript
@@ -507,7 +507,7 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.8.93'))
+    deps.append(('libdcp', 'v1.8.94'))
     deps.append(('libsub', 'v1.6.45'))
     deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
     deps.append(('rtaudio', 'f619b76'))
index 2f43f3c8f9d1b24dd1de7fd37d1f7b896fd8dcae..e86cb2c8002ce2728083115e20634c7c158e7998 100644 (file)
@@ -88,6 +88,12 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
        };
 
        auto add = [&counts, &add_bullet](dcp::VerificationNote note, wxString message) {
+               if (note.reference_hash()) {
+                       message.Replace("%reference_hash", std_to_wx(note.reference_hash().get()));
+               }
+               if (note.calculated_hash()) {
+                       message.Replace("%calculated_hash", std_to_wx(note.calculated_hash().get()));
+               }
                if (note.note()) {
                        message.Replace("%n", std_to_wx(note.note().get()));
                }
@@ -127,19 +133,19 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                        add (i, std_to_wx(*i.note()));
                        break;
                case dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES:
-                       add(i, _("The hash of the CPL %n in the PKL does not agree with the CPL file.  This probably means that the CPL file is corrupt."));
+                       add(i, _("The hash (%reference_hash) of the CPL %n in the PKL does not agree with the CPL file (%calculated_hash).  This probably means that the CPL file is corrupt."));
                        break;
                case dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE:
                        add(i, _("The picture in a reel has a frame rate of %n, which is not valid."));
                        break;
                case dcp::VerificationNote::Code::INCORRECT_PICTURE_HASH:
-                       add(i, _("The hash of the picture asset %f does not agree with the PKL file.  This probably means that the asset file is corrupt."));
+                       add(i, _("The hash (%calculated_hash) of the picture asset %f does not agree with the PKL file (%reference_hash).  This probably means that the asset file is corrupt."));
                        break;
                case dcp::VerificationNote::Code::MISMATCHED_PICTURE_HASHES:
                        add(i, _("The PKL and CPL hashes disagree for picture asset %f."));
                        break;
                case dcp::VerificationNote::Code::INCORRECT_SOUND_HASH:
-                       add(i, _("The hash of the sound asset %f does not agree with the PKL file.  This probably means that the asset file is corrupt."));
+                       add(i, _("The hash (%calculated_hash) of the sound asset %f does not agree with the PKL file (%reference_hash).  This probably means that the asset file is corrupt."));
                        break;
                case dcp::VerificationNote::Code::MISMATCHED_SOUND_HASHES:
                        add(i, _("The PKL and CPL hashes disagree for sound asset %f."));