1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-17 00:27:39 +00:00

Update optional-requirements

Bugfix with serializing tasks
Bugfix order of tasks (id was used instead of task_id)
Code cosmetics
This commit is contained in:
Ozzie Isaacs
2022-04-23 19:56:02 +02:00
parent 2f5b9e41ac
commit 069dc2766f
8 changed files with 79 additions and 70 deletions

View File

@@ -820,9 +820,6 @@ def save_cover_from_url(url, book_path):
log.error("python modul advocate is not installed but is needed")
return False, _("Python modul 'advocate' is not installed but is needed for cover downloads")
img.raise_for_status()
# # cover_processing()
# move_coverfile(meta, db_book)
return save_cover(img, book_path)
except (socket.gaierror,
requests.exceptions.HTTPError,
@@ -1020,7 +1017,7 @@ def render_task_status(tasklist):
ret['user'] = escape(user) # prevent xss
# Hidden fields
ret['id'] = task.id
ret['task_id'] = task.id
ret['stat'] = task.stat
ret['is_cancellable'] = task.is_cancellable
@@ -1078,8 +1075,12 @@ def get_download_link(book_id, book_format, client):
def clear_cover_thumbnail_cache(book_id):
WorkerThread.add(None, TaskClearCoverThumbnailCache(book_id, _("Replace Thumbnail for book {}".format(book_id))),
hidden=True)
WorkerThread.add(None, TaskClearCoverThumbnailCache(book_id), hidden=True)
def replace_cover_thumbnail_cache(book_id):
WorkerThread.add(None, TaskClearCoverThumbnailCache(book_id), hidden=True)
WorkerThread.add(None, TaskGenerateCoverThumbnails(book_id), hidden=True)
def delete_thumbnail_cache():