Fix #1668 (upload of books with language set to different than UI language and not showing all books)

Fix for only showing external port if kobo is really activated in admin menu
pull/1703/head
Ozzieisaacs 4 years ago
parent 0771546dad
commit 400f6e02a5

@ -131,8 +131,9 @@ def admin():
allUser = ub.session.query(ub.User).all()
email_settings = config.get_mail_settings()
kobo_support = feature_support['kobo'] and config.config_kobo_sync
return render_title_template("admin.html", allUser=allUser, email=email_settings, config=config, commit=commit,
feature_support=feature_support,
feature_support=feature_support, kobo_support=kobo_support,
title=_(u"Admin page"), page="admin")

@ -405,7 +405,7 @@ def edit_book_languages(languages, book, upload=False):
# the book it's language is set to the filter language
if input_l[0] != current_user.filter_language() and current_user.filter_language() != "all":
input_l[0] = calibre_db.session.query(db.Languages). \
filter(db.Languages.lang_code == current_user.filter_language()).first()
filter(db.Languages.lang_code == current_user.filter_language()).first().lang_code
# Remove duplicates
input_l = helper.uniq(input_l)
return modify_database_object(input_l, book.languages, db.Languages, calibre_db.session, 'languages')

@ -88,7 +88,7 @@
<div class="col-xs-6 col-sm-6">{{_('Port')}}</div>
<div class="col-xs-6 col-sm-6">{{config.config_port}}</div>
</div>
{% if feature_support['kobo'] and config.config_port != config.config_external_port %}
{% if kobo_support and config.config_port != config.config_external_port %}
<div class="row">
<div class="col-xs-6 col-sm-6">{{_('External Port')}}</div>
<div class="col-xs-6 col-sm-6">{{config.config_external_port}}</div>

Loading…
Cancel
Save