Additional fix #1016

pull/1022/head
Ozzieisaacs 5 years ago
parent f543d7f486
commit 23b3bfd967

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

@ -172,7 +172,7 @@
{% if feature_support['goodreads'] %} {% if feature_support['goodreads'] %}
<div class="form-group"> <div class="form-group">
<input type="checkbox" id="config_use_goodreads" name="config_use_goodreads" data-control="goodreads-settings" {% if config.config_use_goodreads %}checked{% endif %}> <input type="checkbox" id="config_use_goodreads" name="config_use_goodreads" data-control="goodreads-settings" {% if config.config_use_goodreads %}checked{% endif %}>
<label for="config_use_goodreads">{{_('Use')}} Goodreads</label> <label for="config_use_goodreads">{{_('Use Goodreads')}}</label>
<a href="https://www.goodreads.com/api/keys" target="_blank" style="margin-left: 5px">{{_('Obtain an API Key')}}</a> <a href="https://www.goodreads.com/api/keys" target="_blank" style="margin-left: 5px">{{_('Obtain an API Key')}}</a>
</div> </div>
<div data-related="goodreads-settings"> <div data-related="goodreads-settings">

@ -565,9 +565,9 @@ def render_author_books(page, author_id, order):
author_info = None author_info = None
other_books = [] other_books = []
if services.goodreads and config.config_use_goodreads: if services.goodreads_support and config.config_use_goodreads:
author_info = services.goodreads.get_author_info(author_name) author_info = services.goodreads_support.get_author_info(author_name)
other_books = services.goodreads.get_other_books(author_info, entries) other_books = services.goodreads_support.get_other_books(author_info, entries)
return render_title_template('author.html', entries=entries, pagination=pagination, id=author_id, return render_title_template('author.html', entries=entries, pagination=pagination, id=author_id,
title=_(u"Author: %(name)s", name=author_name), author=author_info, title=_(u"Author: %(name)s", name=author_name), author=author_info,

Loading…
Cancel
Save