diff --git a/bazarr/api.py b/bazarr/api.py index ae4fc88f1..91ca3f625 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -103,6 +103,15 @@ class SystemLogs(Resource): return jsonify(data=logs) +class SystemProviders(Resource): + def get(self): + throttled_providers = list_throttled_providers() + for i in range(len(throttled_providers)): + throttled_providers[i][1] = throttled_providers[i][1] if throttled_providers[i][1] is not None else "Good" + throttled_providers[i][2] = throttled_providers[i][2] if throttled_providers[i][2] != "now" else "-" + return jsonify(data=throttled_providers) + + class SystemStatus(Resource): def get(self): system_status = {} @@ -1123,6 +1132,7 @@ api.add_resource(Languages, '/languages') api.add_resource(SystemTasks, '/systemtasks') api.add_resource(SystemLogs, '/systemlogs') +api.add_resource(SystemProviders, '/systemproviders') api.add_resource(SystemStatus, '/systemstatus') api.add_resource(SystemReleases, '/systemreleases') diff --git a/bazarr/main.py b/bazarr/main.py index 6d4474a62..753290d1d 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1028,6 +1028,12 @@ def systemlogs(): return render_template('systemlogs.html') +@app.route('/systemproviders') +@login_required +def systemproviders(): + return render_template('systemproviders.html') + + @app.route('/systemstatus') @login_required def systemstatus(): diff --git a/views/_main.html b/views/_main.html index 1d141c419..96706f142 100644 --- a/views/_main.html +++ b/views/_main.html @@ -190,7 +190,7 @@ diff --git a/views/systemlogs.html b/views/systemlogs.html index 738dbbccb..7b59ceeec 100644 --- a/views/systemlogs.html +++ b/views/systemlogs.html @@ -56,8 +56,8 @@ - Message: - Time: + Message + Time diff --git a/views/systemproviders.html b/views/systemproviders.html new file mode 100644 index 000000000..3043b7e5e --- /dev/null +++ b/views/systemproviders.html @@ -0,0 +1,55 @@ +{% extends '_main.html' %} + +{% block title %}Logs - Bazarr{% endblock %} + +{% block head %} + +{% endblock head %} + +{% block bcleft %} + +{% endblock bcleft %} + +{% block bcright %} + +{% endblock bcright %} + +{% block body %} +
+ + + + + + + + +
NameStatusNext Retry
+
+{% endblock body %} + +{% block tail %} + +{% endblock tail %} diff --git a/views/systemtasks.html b/views/systemtasks.html index 1f349c7fd..baf475da7 100644 --- a/views/systemtasks.html +++ b/views/systemtasks.html @@ -54,6 +54,7 @@ lengthChange: false, searching: false, ordering: false, + info: false, processing: true, serverSide: false, ajax: {