mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
parent
828be29a80
commit
68e21e1098
@ -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):
|
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)
|
book = calibre_db.get_book(book_id)
|
||||||
data = calibre_db.get_book_format(book.id, old_book_format)
|
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:
|
if not data:
|
||||||
error_message = _(u"%(format)s format not found for book id: %(book)d", format=old_book_format, book=book_id)
|
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)
|
log.error("convert_book_format: %s", error_message)
|
||||||
return error_message
|
return error_message
|
||||||
|
file_path = os.path.join(calibre_path, book.path, data.name)
|
||||||
if config.config_use_google_drive:
|
if config.config_use_google_drive:
|
||||||
if not gd.getFileFromEbooksFolder(book.path, data.name + "." + old_book_format.lower()):
|
if not gd.getFileFromEbooksFolder(book.path, data.name + "." + old_book_format.lower()):
|
||||||
error_message = _(u"%(format)s not found on Google Drive: %(fn)s",
|
error_message = _(u"%(format)s not found on Google Drive: %(fn)s",
|
||||||
|
@ -41,4 +41,4 @@ natsort>=2.2.0,<8.2.0
|
|||||||
comicapi>=2.2.0,<2.3.0
|
comicapi>=2.2.0,<2.3.0
|
||||||
|
|
||||||
# Kobo integration
|
# Kobo integration
|
||||||
jsonschema>=3.2.0,<4.8.0
|
jsonschema>=3.2.0,<4.9.0
|
||||||
|
Loading…
Reference in New Issue
Block a user