% from get_args import args % import os % import sqlite3 % from config import settings %if settings.sonarr.getboolean('only_monitored'): % monitored_only_query_string_sonarr = ' AND monitored = "True"' %else: % monitored_only_query_string_sonarr = "" %end %if settings.radarr.getboolean('only_monitored'): % monitored_only_query_string_radarr = ' AND monitored = "True"' %else: % monitored_only_query_string_radarr = "" %end % conn = sqlite3.connect(os.path.join(args.config_dir, 'db', 'bazarr.db'), timeout=30) % c = conn.cursor() % wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string_sonarr).fetchone() % wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string_radarr).fetchone()
% restart_required = c.execute("SELECT configured, updated FROM system").fetchone() % c.close() % if restart_required[1] == '1' and restart_required[0] == '1':
Bazarr need to be restarted to apply last update and changes to general settings. Click here to restart.
% elif restart_required[1] == '1':
Bazarr need to be restarted to apply last update. Click here to restart.
% elif restart_required[0] == '1':
Bazarr need to be restarted to apply changes to general settings. Click here to restart.
% end % from check_update import Updater % if Updater().UPDATE_AVAILABLE is None:
You are running an unknown version of Bazarr. Update
% elif Updater().UPDATE_AVAILABLE == 'release':
% elif Updater().UPDATE_AVAILABLE == 'commit':
A newer version of Bazarr is available!
You are {{ Updater().COMMITS_BEHIND }} commit{{ 's' if Updater().COMMITS_BEHIND > 1 else '' }} behind. Update
% end