pull/605/head
OzzieIsaacs 6 years ago
parent 4dd6c55c38
commit a4190f39de

@ -32,7 +32,7 @@ def versionCalibre():
for lines in p.stdout.readlines():
if isinstance(lines, bytes):
lines = lines.decode('utf-8')
if re.search('.*\(calibre', lines):
if re.search('ebook-convert.*\(calibre', lines):
versions = lines
except Exception:
versions = _(u'Excecution permissions missing')

@ -303,6 +303,7 @@ class WorkerThread(threading.Thread):
if (check < 2 and web.ub.config.config_ebookconverter == 1) or \
(check == 0 and web.ub.config.config_ebookconverter == 2):
cur_book = web.db.session.query(web.db.Books).filter(web.db.Books.id == bookid).first()
if os.path.isfile(file_path + format_new_ext):
new_format = web.db.Data(name=cur_book.data[0].name,
book_format=self.queue[self.current]['settings']['new_book_format'],
book=bookid, uncompressed_size=os.path.getsize(file_path + format_new_ext))
@ -319,6 +320,7 @@ class WorkerThread(threading.Thread):
datetime.now() - self.queue[self.current]['starttime'])
return file_path + format_new_ext
else:
error_message = format_new_ext.upper() + ' format not found on disk'
web.app.logger.info("ebook converter failed with error while converting book")
if not error_message:
error_message = 'Ebook converter failed with unknown error'

Loading…
Cancel
Save