Parse cover image path from content.opf file (#24)

This commit is contained in:
Dave Allie
2025-12-16 03:15:54 +11:00
committed by GitHub
parent 449b3ca161
commit c262f222de
3 changed files with 21 additions and 3 deletions

View File

@@ -69,6 +69,9 @@ bool Epub::parseContentOpf(const std::string& contentOpfFilePath) {
// Grab data from opfParser into epub
title = opfParser.title;
if (!opfParser.coverItemId.empty() && opfParser.items.count(opfParser.coverItemId) > 0) {
coverImageItem = opfParser.items.at(opfParser.coverItemId);
}
if (opfParser.items.count("ncx")) {
tocNcxItem = opfParser.items.at("ncx");