Added PicDocument:getCoverPageImage() and :getProps()

So an image file can have a cover in coverbrowser's display.
It also allows for an alternative viewer (ImageViewer widget)
when holding on file / View full size cover.
This commit is contained in:
poire-z
2017-08-20 12:43:52 +02:00
committed by Frans de Jonge
parent 63241a20ea
commit 031df2ffee
4 changed files with 32 additions and 24 deletions

View File

@@ -352,12 +352,7 @@ function ReaderUI:init()
-- Now that document is loaded, store book metadata in settings
-- (so that filemanager can use it from sideCar file to display
-- Book information).
-- via pcall because picdocument:getProps() may fail
local ok, doc_props = pcall(self.document.getProps, self.document)
if not ok then
doc_props = {}
end
self.doc_settings:saveSetting("doc_props", doc_props)
self.doc_settings:saveSetting("doc_props", self.document:getProps())
-- After initialisation notify that document is loaded and rendered
-- CREngine only reports correct page count after rendering is done