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 @@Name | +Status | +Next Retry | +
---|