1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

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
This commit is contained in:
Ozzieisaacs 2020-11-07 11:44:02 +01:00
parent 0771546dad
commit 400f6e02a5
3 changed files with 4 additions and 3 deletions

View File

@ -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")

View File

@ -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')

View File

@ -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>