mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Enter Book::getIllustrations()
This commit is contained in:
@ -47,6 +47,11 @@ Book::~Book()
|
||||
{
|
||||
}
|
||||
|
||||
Book::Illustrations Book::getIllustrations() const
|
||||
{
|
||||
return m_illustrations;
|
||||
}
|
||||
|
||||
bool Book::update(const kiwix::Book& other)
|
||||
{
|
||||
if (m_readOnly)
|
||||
|
@ -58,10 +58,10 @@ IllustrationInfo getBookIllustrationInfo(const Book& book)
|
||||
{
|
||||
kainjow::mustache::list illustrations;
|
||||
if ( book.isPathValid() ) {
|
||||
for ( auto illustration_size : zim::Archive(book.getPath()).getIllustrationSizes() ) {
|
||||
for ( const auto& illustration : book.getIllustrations() ) {
|
||||
illustrations.push_back(kainjow::mustache::object{
|
||||
{"icon_width", to_string(illustration_size)},
|
||||
{"icon_height", to_string(illustration_size)},
|
||||
{"icon_width", to_string(illustration->width)},
|
||||
{"icon_height", to_string(illustration->height)},
|
||||
{"icon_scale", "1"},
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user