From 10893f3743bfc5c8806900486d021e2fbb041525 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 5 Jul 2024 18:12:50 +0200 Subject: [PATCH] Do not try to add twice Illustration. Illustration is already added by `addIllustration` call. So we must skip the `Illustration_*` metadata. Fix #418 --- src/zimrecreate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zimrecreate.cpp b/src/zimrecreate.cpp index 82c9fbe5..2249bc59 100644 --- a/src/zimrecreate.cpp +++ b/src/zimrecreate.cpp @@ -125,8 +125,9 @@ void create(const std::string& originFilename, const std::string& outFilename, b } catch(...) {} for(auto& metakey:origin.getMetadataKeys()) { - if (metakey == "Counter" ) { + if (metakey == "Counter" || metakey.find("Illustration_") == 0) { // Counter is already added by libzim + // Illustration is already handled by `addIllustration` continue; } auto metadata = origin.getMetadata(metakey);