mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-01 21:16:53 -04:00
Bookshelf: use ceil for count_pages_txt()
This commit is contained in:
parent
3364414959
commit
62cfca95f0
@ -178,7 +178,7 @@ def count_pages_txt(pathtoebook: str) -> int:
|
||||
text = f.read().decode('utf-8', 'replace')
|
||||
e = etree.Element('r')
|
||||
e.tail = clean_xml_chars(text)
|
||||
return get_num_of_significant_chars(e) // CHARS_PER_PAGE
|
||||
return ceil(get_num_of_significant_chars(e) / CHARS_PER_PAGE)
|
||||
|
||||
|
||||
def count_pages(pathtoebook: str, executor: Executor | None = None) -> int:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user