% from get_args import args
% import os
% from database import TableEpisodes, TableMovies, System
% import operator
% from config import settings
% from functools import reduce
%episodes_missing_subtitles_clause = [
% (TableEpisodes.missing_subtitles != '[]')
%]
%if settings.sonarr.getboolean('only_monitored'):
% episodes_missing_subtitles_clause.append(
% (TableEpisodes.monitored == 'True')
% )
%end
%movies_missing_subtitles_clause = [
% (TableMovies.missing_subtitles != '[]')
%]
%if settings.radarr.getboolean('only_monitored'):
% movies_missing_subtitles_clause.append(
% (TableMovies.monitored == 'True')
% )
%end
% wanted_series = TableEpisodes.select().where(reduce(operator.and_, episodes_missing_subtitles_clause)).count()
% wanted_movies = TableMovies.select().where(reduce(operator.and_, movies_missing_subtitles_clause)).count()
% include('menu.tpl')
% include('footer.tpl')