diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-08 22:24:14 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-08 22:24:14 +0200 |
| commit | e80119614a0975de33ed8a370fbfe60a2a915b1e (patch) | |
| tree | 87831501e818b34fb8d814fb97f864aa0cb6fbe0 /src/verify.cc | |
| parent | 54953e5f759374de8f99dd83ab47030c38dd7f0e (diff) | |
Only check hashes of each asset once (#3035).v1.10.21
Diffstat (limited to 'src/verify.cc')
| -rw-r--r-- | src/verify.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/verify.cc b/src/verify.cc index b7ffeb0d..d3ab2c3f 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -533,7 +533,11 @@ verify_main_picture_asset(Context& context, shared_ptr<const ReelPictureAsset> r auto asset = reel_asset->asset(); auto const file = *asset->file(); - if (context.options.check_asset_hashes && (!context.options.maximum_asset_size_for_hash_check || filesystem::file_size(file) < *context.options.maximum_asset_size_for_hash_check)) { + if ( + context.options.check_asset_hashes && + (!context.options.maximum_asset_size_for_hash_check || filesystem::file_size(file) < *context.options.maximum_asset_size_for_hash_check) && + context.should_verify_asset(reel_asset->id()) + ) { context.stage("Checking picture asset hash", file); string reference_hash; string calculated_hash; @@ -618,7 +622,11 @@ verify_main_sound_asset(Context& context, shared_ptr<const ReelSoundAsset> reel_ auto asset = reel_asset->asset(); auto const file = *asset->file(); - if (context.options.check_asset_hashes && (!context.options.maximum_asset_size_for_hash_check || filesystem::file_size(file) < *context.options.maximum_asset_size_for_hash_check)) { + if ( + context.options.check_asset_hashes && + (!context.options.maximum_asset_size_for_hash_check || filesystem::file_size(file) < *context.options.maximum_asset_size_for_hash_check) && + context.should_verify_asset(reel_asset->id()) + ) { context.stage("Checking sound asset hash", file); string reference_hash; string calculated_hash; |
