mirror of https://github.com/kiwix/libkiwix.git
Book::updateFromOpds() resets Book::m_illustrations
This commit is contained in:
parent
e52a4a646b
commit
bd29c4c7ef
|
@ -196,10 +196,11 @@ void Book::updateFromOpds(const pugi::xml_node& node, const std::string& urlHost
|
||||||
m_size = strtoull(linkNode.attribute("length").value(), 0, 0);
|
m_size = strtoull(linkNode.attribute("length").value(), 0, 0);
|
||||||
}
|
}
|
||||||
if (rel == "http://opds-spec.org/image/thumbnail") {
|
if (rel == "http://opds-spec.org/image/thumbnail") {
|
||||||
Illustration& favicon = getMutableDefaultIllustration();
|
const auto favicon = std::make_shared<Illustration>();
|
||||||
// XXX: shouldn't favicon.data be cleared()?
|
favicon->data.clear();
|
||||||
favicon.url = urlHost + linkNode.attribute("href").value();
|
favicon->url = urlHost + linkNode.attribute("href").value();
|
||||||
favicon.mimeType = linkNode.attribute("type").value();
|
favicon->mimeType = linkNode.attribute("type").value();
|
||||||
|
m_illustrations.assign(1, favicon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue