mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-26 01:50:31 +00:00
Update optional pydrive requirement
Bugfix cover url download for Wand insted of Pillow Fix for gdrive with unknown certificates
This commit is contained in:
parent
352b4a0b73
commit
72a02e087c
@ -21,6 +21,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
import chardet
|
import chardet
|
||||||
|
import ssl
|
||||||
|
|
||||||
from flask import Response, stream_with_context
|
from flask import Response, stream_with_context
|
||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
@ -216,7 +217,7 @@ def listRootFolders():
|
|||||||
drive = getDrive(Gdrive.Instance().drive)
|
drive = getDrive(Gdrive.Instance().drive)
|
||||||
folder = "'root' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false"
|
folder = "'root' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false"
|
||||||
fileList = drive.ListFile({'q': folder}).GetList()
|
fileList = drive.ListFile({'q': folder}).GetList()
|
||||||
except ServerNotFoundError as e:
|
except (ServerNotFoundError, ssl.SSLError) as e:
|
||||||
log.info("GDrive Error %s" % e)
|
log.info("GDrive Error %s" % e)
|
||||||
fileList = []
|
fileList = []
|
||||||
return fileList
|
return fileList
|
||||||
|
@ -63,6 +63,7 @@ log = logger.create()
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from wand.image import Image
|
from wand.image import Image
|
||||||
|
from wand.exceptions import MissingDelegateError
|
||||||
use_IM = True
|
use_IM = True
|
||||||
except (ImportError, RuntimeError) as e:
|
except (ImportError, RuntimeError) as e:
|
||||||
log.debug('Cannot import Image, generating covers from non jpg files will not work: %s', e)
|
log.debug('Cannot import Image, generating covers from non jpg files will not work: %s', e)
|
||||||
@ -585,9 +586,9 @@ def save_cover_from_url(url, book_path):
|
|||||||
requests.exceptions.Timeout) as ex:
|
requests.exceptions.Timeout) as ex:
|
||||||
log.info(u'Cover Download Error %s', ex)
|
log.info(u'Cover Download Error %s', ex)
|
||||||
return False, _("Error Downloading Cover")
|
return False, _("Error Downloading Cover")
|
||||||
# except UnidentifiedImageError as ex:
|
except MissingDelegateError as ex:
|
||||||
# log.info(u'File Format Error %s', ex)
|
log.info(u'File Format Error %s', ex)
|
||||||
# return False, _("Cover Format Error")
|
return False, _("Cover Format Error")
|
||||||
|
|
||||||
|
|
||||||
def save_cover_from_filestorage(filepath, saved_filename, img):
|
def save_cover_from_filestorage(filepath, saved_filename, img):
|
||||||
|
@ -7,7 +7,7 @@ oauth2client>=4.0.0,<4.1.4
|
|||||||
uritemplate>=3.0.0,<3.1.0
|
uritemplate>=3.0.0,<3.1.0
|
||||||
pyasn1-modules>=0.0.8,<0.3.0
|
pyasn1-modules>=0.0.8,<0.3.0
|
||||||
pyasn1>=0.1.9,<0.5.0
|
pyasn1>=0.1.9,<0.5.0
|
||||||
PyDrive>=1.3.1,<1.4.0
|
PyDrive2>=1.3.1,<1.8.0
|
||||||
PyYAML>=3.12
|
PyYAML>=3.12
|
||||||
rsa==3.4.2,<4.1.0
|
rsa==3.4.2,<4.1.0
|
||||||
six>=1.10.0,<1.15.0
|
six>=1.10.0,<1.15.0
|
||||||
|
Loading…
Reference in New Issue
Block a user