Change get_argv to get_args in templates

pull/292/head
Halali 6 years ago
parent 4ac6690efc
commit f941ee5199

@ -50,7 +50,6 @@
</div> </div>
% include('menu.tpl') % include('menu.tpl')
% from get_argv import config_dir
% import os % import os
% from get_settings import get_general_settings % from get_settings import get_general_settings

@ -20,7 +20,7 @@
</style> </style>
</head> </head>
<body> <body>
% from get_argv import config_dir % from get_args import args
% import os % import os
% import sqlite3 % import sqlite3
@ -32,7 +32,7 @@
% monitored_only_query_string = "" % monitored_only_query_string = ""
%end %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() % c = conn.cursor()
% wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone() % 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() % wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()

@ -1364,9 +1364,8 @@
<script> <script>
% from get_args import args
% from get_argv import no_update % if args.no_update:
% if no_update is True:
$("#div_update").hide(); $("#div_update").hide();
% end % end

@ -44,7 +44,7 @@
</style> </style>
</head> </head>
<body> <body>
% from get_argv import config_dir % from get_args import args
% import os % import os
% import sqlite3 % import sqlite3
@ -56,7 +56,7 @@
% monitored_only_query_string = "" % monitored_only_query_string = ""
%end %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() % c = conn.cursor()
% wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone() % 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() % wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()

Loading…
Cancel
Save