mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user