|
|
|
@ -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'
|
|
|
|
|