1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-25 02:57:22 +00:00

Fix #2495, Fix #2494 (Convert for not existent file no longer fails)

This commit is contained in:
Ozzie Isaacs 2022-07-31 11:28:11 +02:00
parent 828be29a80
commit 68e21e1098
2 changed files with 2 additions and 2 deletions

View File

@ -75,11 +75,11 @@ except (ImportError, RuntimeError) as e:
def convert_book_format(book_id, calibre_path, old_book_format, new_book_format, user_id, ereader_mail=None):
book = calibre_db.get_book(book_id)
data = calibre_db.get_book_format(book.id, old_book_format)
file_path = os.path.join(calibre_path, book.path, data.name)
if not data:
error_message = _(u"%(format)s format not found for book id: %(book)d", format=old_book_format, book=book_id)
log.error("convert_book_format: %s", error_message)
return error_message
file_path = os.path.join(calibre_path, book.path, data.name)
if config.config_use_google_drive:
if not gd.getFileFromEbooksFolder(book.path, data.name + "." + old_book_format.lower()):
error_message = _(u"%(format)s not found on Google Drive: %(fn)s",

View File

@ -41,4 +41,4 @@ natsort>=2.2.0,<8.2.0
comicapi>=2.2.0,<2.3.0
# Kobo integration
jsonschema>=3.2.0,<4.8.0
jsonschema>=3.2.0,<4.9.0