New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverbrowser: quicker extraction of EPUB metadata #3736

Merged
merged 2 commits into from Mar 10, 2018

Conversation

Projects
None yet
2 participants
@poire-z
Contributor

poire-z commented Mar 10, 2018

bump crengine:
Allow for quicker loading when interested in metadata only koreader/crengine#123
Allow for more than 65535 different attribute values koreader/crengine#124
Increase gamma values range koreader/crengine#122

coverbrowser: quicker extraction of EPUB metadata
bump crengine:
Allow for quicker loading when interested in metadata only.
Allow for more than 65535 different attribute values.
Increase gamma values range.
@@ -132,9 +132,9 @@ function CreDocument:init()
self.info.configurable = true
end
function CreDocument:loadDocument()
function CreDocument:loadDocument(only_metadata)

This comment has been minimized.

@Frenzie

Frenzie Mar 10, 2018

Member

I wonder if it might be clearer as something like full_document (default true, false for metadata only)? Then again, this way it's consistent with crengine, except there we didn't have a choice.

This comment has been minimized.

@poire-z

poire-z Mar 10, 2018

Contributor

But loadDocument() is the generic "loading", only_metadata is the exception.
full_document if absent, considered true, will make it less clear I think:
self._document:loadDocument(self.file, full_document == false) ?
Or:

local only_metadata = full_document == false
self._document:loadDocument(self.file, only_metadata)
@@ -372,7 +372,7 @@ function BookInfoManager:extractBookInfo(filepath, cover_specs)
-- Setting a default font before loading document
-- actually do prevent some crashes
document:setFontFace(document.default_font)
if not document:loadDocument() then
if not document:loadDocument(false) then -- load only metadata

This comment has been minimized.

@Frenzie

Frenzie Mar 10, 2018

Member

Yes, I think this is slightly clearer because passing false implies you're not doing something that's normally expected. But whichever. :-)

@poire-z poire-z merged commit db31bd4 into koreader:master Mar 10, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@poire-z poire-z deleted the poire-z:coverbrowser_quicker_epub branch Mar 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment