Skip to content

[statistic plugin] Don't generate md5 sum on open document#5528

Merged
Frenzie merged 1 commit intokoreader:masterfrom
robert00s:md5
Oct 26, 2019
Merged

[statistic plugin] Don't generate md5 sum on open document#5528
Frenzie merged 1 commit intokoreader:masterfrom
robert00s:md5

Conversation

@robert00s
Copy link
Copy Markdown
Contributor

There is no need to generate a md5 sum for documents that were already opened.

@Frenzie Frenzie added this to the 2019.11 milestone Oct 24, 2019

self.data.pages = self.view.document:getPageCount()
self.data.md5 = self:partialMd5(self.document.file)
if not self.data.md5 then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it also check that it's not an empty string?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On initialize self.data.md5 should be nil so we don't need to check that string is empty.

@Frenzie Frenzie added the Plugin label Oct 26, 2019
@Frenzie Frenzie merged commit dec0e73 into koreader:master Oct 26, 2019
@robert00s robert00s deleted the md5 branch November 23, 2019 18:13
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
…5528)

There is no need to generate a md5 sum for documents that were already opened.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants