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

Fix "is not a valid language" on upload of comic books

Fix metadata excration of comic books
updated bootstrap table
updated handling of upload formats restrictions
This commit is contained in:
Ozzieisaacs
2020-09-20 15:03:25 +02:00
parent 165c649f31
commit 7ba014ba49
66 changed files with 585 additions and 358 deletions

View File

@@ -471,7 +471,7 @@ def upload_single_file(request, book, book_id):
if requested_file.filename != '':
if '.' in requested_file.filename:
file_ext = requested_file.filename.rsplit('.', 1)[-1].lower()
if file_ext not in constants.EXTENSIONS_UPLOAD:
if file_ext not in constants.EXTENSIONS_UPLOAD and '' not in constants.EXTENSIONS_UPLOAD:
flash(_("File extension '%(ext)s' is not allowed to be uploaded to this server", ext=file_ext),
category="error")
return redirect(url_for('web.show_book', book_id=book.id))
@@ -656,6 +656,7 @@ def edit_book(book_id):
if modif_date:
book.last_modified = datetime.utcnow()
calibre_db.session.merge(book)
calibre_db.session.commit()
if config.config_use_google_drive:
gdriveutils.updateGdriveCalibreFromLocal()
@@ -719,7 +720,7 @@ def upload():
# check if file extension is correct
if '.' in requested_file.filename:
file_ext = requested_file.filename.rsplit('.', 1)[-1].lower()
if file_ext not in constants.EXTENSIONS_UPLOAD:
if file_ext not in constants.EXTENSIONS_UPLOAD and '' not in constants.EXTENSIONS_UPLOAD:
flash(
_("File extension '%(ext)s' is not allowed to be uploaded to this server",
ext=file_ext), category="error")