|
|
@ -103,7 +103,7 @@ function BookInfo:show(file, book_props)
|
|
|
|
local loaded = true
|
|
|
|
local loaded = true
|
|
|
|
local pages
|
|
|
|
local pages
|
|
|
|
if document.loadDocument then -- CreDocument
|
|
|
|
if document.loadDocument then -- CreDocument
|
|
|
|
if not document:loadDocument() then
|
|
|
|
if not document:loadDocument(false) then -- load only metadata
|
|
|
|
-- failed loading, calling other methods would segfault
|
|
|
|
-- failed loading, calling other methods would segfault
|
|
|
|
loaded = false
|
|
|
|
loaded = false
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -173,6 +173,9 @@ function BookInfo:show(file, book_props)
|
|
|
|
local widget
|
|
|
|
local widget
|
|
|
|
local document = DocumentRegistry:openDocument(file)
|
|
|
|
local document = DocumentRegistry:openDocument(file)
|
|
|
|
if document then
|
|
|
|
if document then
|
|
|
|
|
|
|
|
if document.loadDocument then -- CreDocument
|
|
|
|
|
|
|
|
document:loadDocument(false) -- load only metadata
|
|
|
|
|
|
|
|
end
|
|
|
|
local cover_bb = document:getCoverPageImage()
|
|
|
|
local cover_bb = document:getCoverPageImage()
|
|
|
|
if cover_bb then
|
|
|
|
if cover_bb then
|
|
|
|
widget = ImageViewer:new{
|
|
|
|
widget = ImageViewer:new{
|
|
|
|