This commit is contained in:
Ozzieisaacs 2019-08-20 18:32:04 +02:00
parent 7e530618b7
commit f543d7f486
6 changed files with 12 additions and 8 deletions

View File

@ -100,8 +100,10 @@ def create_app():
if services.ldap:
services.ldap.init_app(app, config)
if services.goodreads:
services.goodreads.connect(config.config_goodreads_api_key, config.config_goodreads_api_secret, config.config_use_goodreads)
if services.goodreads_support:
services.goodreads_support.connect(config.config_goodreads_api_key,
config.config_goodreads_api_secret,
config.config_use_goodreads)
return app

View File

@ -63,7 +63,7 @@ _VERSIONS = OrderedDict(
pytz=pytz.__version__,
Unidecode = unidecode_version,
Flask_SimpleLDAP = _(u'installed') if bool(services.ldap) else _(u'not installed'),
Goodreads = _(u'installed') if bool(services.goodreads) else _(u'not installed'),
Goodreads = _(u'installed') if bool(services.goodreads_support) else _(u'not installed'),
)
_VERSIONS.update(uploader.get_versions())

View File

@ -46,7 +46,7 @@ from .web import admin_required, render_title_template, before_request, unconfig
feature_support = {
'ldap': False, # bool(services.ldap),
'goodreads': bool(services.goodreads)
'goodreads': bool(services.goodreads_support)
}
# try:
@ -338,8 +338,10 @@ def _configuration_update_helper():
_config_checkbox("config_use_goodreads")
_config_string("config_goodreads_api_key")
_config_string("config_goodreads_api_secret")
if services.goodreads:
services.goodreads.connect(config.config_goodreads_api_key, config.config_goodreads_api_secret, config.config_use_goodreads)
if services.goodreads_support:
services.goodreads_support.connect(config.config_goodreads_api_key,
config.config_goodreads_api_secret,
config.config_use_goodreads)
_config_int("config_updatechannel")

View File

@ -24,7 +24,7 @@ from .. import logger
log = logger.create()
try: from . import goodreads
try: from . import goodreads_support
except ImportError as err:
log.debug("cannot import goodreads, showing authors-metadata will not work: %s", err)
goodreads = None

View File

@ -55,7 +55,7 @@ from .redirect import redirect_back
feature_support = {
'ldap': False, # bool(services.ldap),
'goodreads': bool(services.goodreads)
'goodreads': bool(services.goodreads_support)
}
try: