From f941ee51990252cbfac17681065576df0f057522 Mon Sep 17 00:00:00 2001 From: Halali Date: Thu, 29 Nov 2018 20:09:34 +0100 Subject: [PATCH] Change get_argv to get_args in templates --- views/history.tpl | 1 - views/menu.tpl | 4 ++-- views/settings.tpl | 5 ++--- views/wanted.tpl | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/views/history.tpl b/views/history.tpl index cdabe9b15..58530337f 100644 --- a/views/history.tpl +++ b/views/history.tpl @@ -50,7 +50,6 @@ % include('menu.tpl') - % from get_argv import config_dir % import os % from get_settings import get_general_settings diff --git a/views/menu.tpl b/views/menu.tpl index bc79aba23..a3ccd875c 100644 --- a/views/menu.tpl +++ b/views/menu.tpl @@ -20,7 +20,7 @@ - % from get_argv import config_dir + % from get_args import args % import os % import sqlite3 @@ -32,7 +32,7 @@ % monitored_only_query_string = "" %end - % conn = sqlite3.connect(os.path.join(config_dir, 'db', 'bazarr.db'), timeout=30) + % 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).fetchone() % wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone() diff --git a/views/settings.tpl b/views/settings.tpl index bdbbff1fb..df1270057 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -1364,9 +1364,8 @@