mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -218,7 +218,7 @@ class Serializer(object):
|
||||
for elem in item.data.find(XHTML('body')):
|
||||
self.serialize_elem(elem, item)
|
||||
#buffer.write('</mbp:section>')
|
||||
buffer.write('</mbp:pagebreak>')
|
||||
buffer.write('<mbp:pagebreak/>')
|
||||
|
||||
def serialize_elem(self, elem, item, nsrmap=NSRMAP):
|
||||
buffer = self.buffer
|
||||
|
@ -30,8 +30,8 @@ from calibre.gui2 import config as gui_conf
|
||||
class CoverFetcher(QThread):
|
||||
|
||||
def __init__(self, username, password, isbn, timeout, title, author):
|
||||
self.username = username
|
||||
self.password = password
|
||||
self.username = username.strip() if username else username
|
||||
self.password = password.strip() if password else password
|
||||
self.timeout = timeout
|
||||
self.isbn = isbn
|
||||
self.title = title
|
||||
@ -60,7 +60,8 @@ class CoverFetcher(QThread):
|
||||
return
|
||||
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]
|
||||
except Exception, e:
|
||||
self.exception = e
|
||||
|
Loading…
x
Reference in New Issue
Block a user