diff --git a/bazarr/check_update.py b/bazarr/check_update.py index c780b7e1e..d813a7172 100644 --- a/bazarr/check_update.py +++ b/bazarr/check_update.py @@ -67,7 +67,7 @@ def check_releases(): else: for release in r.json(): releases.append([release['name'], release['body']]) - with open(os.path.join(config_dir, 'config', 'releases.txt'), 'w') as f: + with open(os.path.join(args.config_dir, 'config', 'releases.txt'), 'w') as f: json.dump(releases, f) diff --git a/bazarr/init.py b/bazarr/init.py index 86fe50a87..30b62210e 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -30,7 +30,7 @@ if not os.path.exists(os.path.join(args.config_dir, 'log')): os.mkdir(os.path.join(args.config_dir, 'log')) logging.debug("BAZARR Created log folder") -if not os.path.exists(os.path.join(config_dir, 'config', 'releases.txt')): +if not os.path.exists(os.path.join(args.config_dir, 'config', 'releases.txt')): from check_update import check_releases check_releases() logging.debug("BAZARR Created releases file") diff --git a/bazarr/main.py b/bazarr/main.py index f27138ec0..a863bcd20 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -2,6 +2,7 @@ import gc import sys +import libs import bottle import itertools import operator