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 authored and Frans de Jonge committed 2017-08-20 19:59:15 +02:00
1 parent 63241a20ea
commit 031df2ffee
4 files changed
+32 -24

No files matched your search

+1 -6
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