diff --git a/bazarr/config.py b/bazarr/config.py index 3aef9614b..35cd76623 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -1,4 +1,5 @@ # coding=utf-8 +import hashlib import os from simpleconfigparser import simpleconfigparser @@ -157,6 +158,9 @@ def save_settings(settings_items): elif value == 'false': value = 'False' + if key == 'settings-auth-password': + value = hashlib.md5(value.encode('utf-8')).hexdigest() + if settings_keys[0] == 'settings': settings[settings_keys[1]][settings_keys[2]] = str(value) diff --git a/bazarr/main.py b/bazarr/main.py index 52c85ae7c..ca239b99b 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -158,6 +158,7 @@ def post_get(name, default=''): @app.route("/logout/") @login_required def logout(): + test = settings.auth.type if settings.auth.type == 'basic': return abort(401) elif settings.auth.type == 'form': @@ -562,43 +563,43 @@ def movie(no): return render_template('movie.html', id=str(no)) -@app.route('/historyseries/') +@app.route('/history/series/') @login_required def historyseries(): return render_template('historyseries.html') -@app.route('/historymovies/') +@app.route('/history/movies/') @login_required def historymovies(): return render_template('historymovies.html') -@app.route('/wantedseries/') +@app.route('/wanted/series/') @login_required def wantedseries(): return render_template('wantedseries.html') -@app.route('/wantedmovies/') +@app.route('/wanted/movies/') @login_required def wantedmovies(): return render_template('wantedmovies.html') -@app.route('/settingsgeneral/') +@app.route('/settings/general/') @login_required def settingsgeneral(): return render_template('settingsgeneral.html') -@app.route('/settingssonarr/') +@app.route('/settings/sonarr/') @login_required def settingssonarr(): return render_template('settingssonarr.html') -@app.route('/settingsradarr/') +@app.route('/settings/radarr/') @login_required def settingsradarr(): return render_template('settingsradarr.html') @@ -613,31 +614,31 @@ def check_update(): return '', 200 -@app.route('/systemtasks') +@app.route('/system/tasks') @login_required def systemtasks(): return render_template('systemtasks.html') -@app.route('/systemlogs') +@app.route('/system/logs') @login_required def systemlogs(): return render_template('systemlogs.html') -@app.route('/systemproviders') +@app.route('/system/providers') @login_required def systemproviders(): return render_template('systemproviders.html') -@app.route('/systemstatus') +@app.route('/system/status') @login_required def systemstatus(): return render_template('systemstatus.html') -@app.route('/systemreleases') +@app.route('/system/releases') @login_required def systemreleases(): return render_template('systemreleases.html') diff --git a/views/settingsgeneral.html b/views/settingsgeneral.html index 30c5d9ccd..ead53928f 100644 --- a/views/settingsgeneral.html +++ b/views/settingsgeneral.html @@ -73,13 +73,13 @@ Authentication
- - - + +
- +{# #}
@@ -122,7 +122,7 @@ Type
- @@ -186,7 +186,7 @@ Page Size
- @@ -237,7 +237,7 @@ Branch
- diff --git a/views/systemlogs.html b/views/systemlogs.html index 7433b6e35..4724514d7 100644 --- a/views/systemlogs.html +++ b/views/systemlogs.html @@ -68,7 +68,7 @@