From 5fcad77383f64d68d69b3abc60da9916e2442a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Fri, 13 Sep 2019 16:30:18 -0400 Subject: [PATCH] Missing Cork file creation. --- bazarr/init.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bazarr/init.py b/bazarr/init.py index 87ff2a9d7..552848bb7 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -68,6 +68,23 @@ config_file = os.path.normpath(os.path.join(args.config_dir, 'config', 'config.i cfg = ConfigParser() +if not os.path.exists(os.path.normpath(os.path.join(args.config_dir, 'config', 'users.json'))): + cork = Cork(os.path.normpath(os.path.join(args.config_dir, 'config')), initialize=True) + + cork._store.roles[''] = 100 + cork._store.save_roles() + + tstamp = str(time.time()) + username = password = '' + cork._store.users[username] = { + 'role': '', + 'hash': cork._hash(username, password), + 'email_addr': username, + 'desc': username, + 'creation_date': tstamp + } + cork._store.save_users() + def init_binaries(): exe = get_binary("unrar")