From 752e4d931e3869d3e619941c3e8890a77c032c0d Mon Sep 17 00:00:00 2001 From: Halali Date: Tue, 12 Feb 2019 22:57:04 +0100 Subject: [PATCH] Fix missing arguments in init file --- bazarr/init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazarr/init.py b/bazarr/init.py index 1875c09a6..6f384c8b0 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -98,7 +98,7 @@ if cfg.has_section('general'): # Move providers settings from DB to config file try: - db = sqlite3.connect(os.path.join(config_dir, 'db', 'bazarr.db'), timeout=30) + db = sqlite3.connect(os.path.join(args.config_dir, 'db', 'bazarr.db'), timeout=30) c = db.cursor() enabled_providers = c.execute("SELECT * FROM table_settings_providers WHERE enabled = 1").fetchall() settings_providers = c.execute("SELECT * FROM table_settings_providers").fetchall() @@ -125,7 +125,7 @@ try: settings.legendastv.password = provider[3] settings.general.enabled_providers = u'' if not providers_list else ','.join(providers_list) - with open(os.path.join(config_dir, 'config', 'config.ini'), 'w+') as handle: + with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle: settings.write(handle) except: @@ -186,4 +186,4 @@ def init_binaries(): return unrar -init_binaries() \ No newline at end of file +init_binaries()