mirror of https://github.com/kiwix/libkiwix.git
Book::updateFromXml() resets Book::m_illustrations
This commit is contained in:
parent
537ba7e6b9
commit
e52a4a646b
|
@ -144,10 +144,11 @@ void Book::updateFromXml(const pugi::xml_node& node, const std::string& baseDir)
|
|||
m_articleCount = strtoull(ATTR("articleCount"), 0, 0);
|
||||
m_mediaCount = strtoull(ATTR("mediaCount"), 0, 0);
|
||||
m_size = strtoull(ATTR("size"), 0, 0) << 10;
|
||||
Illustration& favicon = getMutableDefaultIllustration();
|
||||
favicon.data = base64_decode(ATTR("favicon"));
|
||||
favicon.mimeType = ATTR("faviconMimeType");
|
||||
favicon.url = ATTR("faviconUrl");
|
||||
const auto favicon = std::make_shared<Illustration>();
|
||||
favicon->data = base64_decode(ATTR("favicon"));
|
||||
favicon->mimeType = ATTR("faviconMimeType");
|
||||
favicon->url = ATTR("faviconUrl");
|
||||
m_illustrations.assign(1, favicon);
|
||||
try {
|
||||
m_downloadId = ATTR("downloadId");
|
||||
} catch(...) {}
|
||||
|
|
Loading…
Reference in New Issue