mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 22:15:37 +01:00
MOBI Output: Fix regression that was preventing the creation of pagebreaks between the contents of different HTML files in the input.
This commit is contained in:
parent
c2b79fe5d9
commit
d8430be7c8
2 changed files with 5 additions and 4 deletions
|
|
@ -218,7 +218,7 @@ def serialize_item(self, item):
|
||||||
for elem in item.data.find(XHTML('body')):
|
for elem in item.data.find(XHTML('body')):
|
||||||
self.serialize_elem(elem, item)
|
self.serialize_elem(elem, item)
|
||||||
#buffer.write('</mbp:section>')
|
#buffer.write('</mbp:section>')
|
||||||
buffer.write('</mbp:pagebreak>')
|
buffer.write('<mbp:pagebreak/>')
|
||||||
|
|
||||||
def serialize_elem(self, elem, item, nsrmap=NSRMAP):
|
def serialize_elem(self, elem, item, nsrmap=NSRMAP):
|
||||||
buffer = self.buffer
|
buffer = self.buffer
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@
|
||||||
class CoverFetcher(QThread):
|
class CoverFetcher(QThread):
|
||||||
|
|
||||||
def __init__(self, username, password, isbn, timeout, title, author):
|
def __init__(self, username, password, isbn, timeout, title, author):
|
||||||
self.username = username
|
self.username = username.strip() if username else username
|
||||||
self.password = password
|
self.password = password.strip() if password else password
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.isbn = isbn
|
self.isbn = isbn
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
@ -60,7 +60,8 @@ def run(self):
|
||||||
return
|
return
|
||||||
self.isbn = results[0]
|
self.isbn = results[0]
|
||||||
|
|
||||||
login(self.username, self.password, force=False)
|
if self.username and self.password:
|
||||||
|
login(self.username, self.password, force=False)
|
||||||
self.cover_data = cover_from_isbn(self.isbn, timeout=self.timeout)[0]
|
self.cover_data = cover_from_isbn(self.isbn, timeout=self.timeout)[0]
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.exception = e
|
self.exception = e
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue