1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-16 08:07:40 +00:00

Added additional debug messages, catch additional errors in updater

This commit is contained in:
Ozzie Isaacs
2021-04-25 11:20:21 +02:00
parent 97e4707f72
commit 4e3a5ca33b
5 changed files with 88 additions and 41 deletions

View File

@@ -693,6 +693,7 @@ def do_download_file(book, book_format, client, data, headers):
# ToDo Check headers parameter
for element in headers:
response.headers[element[0]] = element[1]
log.info('Downloading file: {}'.format(os.path.join(filename, data.name + "." + book_format)))
return response
##################################
@@ -732,7 +733,6 @@ def json_serial(obj):
'seconds': obj.seconds,
'microseconds': obj.microseconds,
}
# return obj.isoformat()
raise TypeError("Type %s not serializable" % type(obj))
@@ -830,6 +830,7 @@ def get_download_link(book_id, book_format, client):
if book:
data1 = calibre_db.get_book_format(book.id, book_format.upper())
else:
log.error("Book id {} not found for downloading".format(book_id))
abort(404)
if data1:
# collect downloaded books only for registered user and not for anonymous user