% from get_argv import config_dir % import os % import sqlite3 % from get_settings import get_general_settings %if get_general_settings()[24] is True: % monitored_only_query_string = ' AND monitored = "True"' %else: % monitored_only_query_string = "" %end % conn = sqlite3.connect(os.path.join(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).fetchone() % wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
% if get_general_settings()[12] is True:
Series
% end % if get_general_settings()[13] is True:
Movies
% end
History
% if get_general_settings()[12] is True:
{{wanted_series[0]}}
% end % if get_general_settings()[13] is True:
{{wanted_movies[0]}}
% end
Wanted
Settings
System
% 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.
% elif restart_required[1] == '1':
Bazarr need to be restarted to apply last update.
% elif restart_required[0] == '1':
Bazarr need to be restarted to apply changes to general settings.
% end