Skip to content

Commit

Permalink
Fix janeczku#2495, Fix janeczku#2494 (Convert for not existent file n…
Browse files Browse the repository at this point in the history
…o longer fails)
  • Loading branch information
OzzieIsaacs committed Jul 31, 2022
1 parent 828be29 commit 68e21e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cps/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
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",
Expand Down
2 changes: 1 addition & 1 deletion optional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 68e21e1

Please sign in to comment.