2
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-16 06:12:58 +00:00

Merge branch 'master' into Develop

This commit is contained in:
Ozzieisaacs 2020-11-22 08:08:27 +01:00
commit 6538aff02f
2 changed files with 9 additions and 6 deletions

View File

@ -652,12 +652,15 @@ def edit_book(book_id):
if to_save["cover_url"]: if to_save["cover_url"]:
if not current_user.role_upload(): if not current_user.role_upload():
return "", (403) return "", (403)
result, error = helper.save_cover_from_url(to_save["cover_url"], book.path) if to_save["cover_url"].endswith('/static/generic_cover.jpg'):
if result is True: book.has_cover = 0
book.has_cover = 1
modif_date = True
else: else:
flash(error, category="error") result, error = helper.save_cover_from_url(to_save["cover_url"], book.path)
if result is True:
book.has_cover = 1
modif_date = True
else:
flash(error, category="error")
# Add default series_index to book # Add default series_index to book
modif_date |= edit_book_series_index(to_save["series_index"], book) modif_date |= edit_book_series_index(to_save["series_index"], book)

View File

@ -108,7 +108,7 @@ $(function () {
tags: result.volumeInfo.categories || [], tags: result.volumeInfo.categories || [],
rating: result.volumeInfo.averageRating || 0, rating: result.volumeInfo.averageRating || 0,
cover: result.volumeInfo.imageLinks ? cover: result.volumeInfo.imageLinks ?
result.volumeInfo.imageLinks.thumbnail : "/static/generic_cover.jpg", result.volumeInfo.imageLinks.thumbnail : location + "/../../../static/generic_cover.jpg",
url: "https://books.google.com/books?id=" + result.id, url: "https://books.google.com/books?id=" + result.id,
source: { source: {
id: "google", id: "google",