Skip to content

Commit

Permalink
Do not try to add twice Illustration.
Browse files Browse the repository at this point in the history
Illustration is already added by `addIllustration` call.
So we must skip the `Illustration_*` metadata.

Fix #418
  • Loading branch information
mgautierfr committed Jul 5, 2024
1 parent 1b2e64c commit 10893f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zimrecreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 10893f3

Please sign in to comment.