diff options
author | Halali <[email protected]> | 2019-01-05 15:55:27 +0100 |
---|---|---|
committer | Halali <[email protected]> | 2019-01-05 15:55:27 +0100 |
commit | d6d7c4bd1f364758525cfd87248f852f7ddc6160 (patch) | |
tree | 8da7b6b7fa130db581821798a6d541452254c873 | |
parent | 84ccabfad4f5793cd4558ce3b5f553be057c9357 (diff) | |
download | bazarr-d6d7c4bd1f364758525cfd87248f852f7ddc6160.tar.gz bazarr-d6d7c4bd1f364758525cfd87248f852f7ddc6160.zip |
Fix init script
-rw-r--r-- | bazarr/init.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bazarr/init.py b/bazarr/init.py index ca8823c1a..2a358c301 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -93,9 +93,13 @@ try: db.close() providers_list = [] - if len(enabled_providers) > 0: + if enabled_providers: for provider in enabled_providers: providers_list.append(provider[0]) + else: + providers_list = None + + if settings_providers: for provider in settings_providers: if provider[0] == 'opensubtitles': settings.opensubtitles.username = provider[2] @@ -106,8 +110,6 @@ try: elif provider[0] == 'legendastv': settings.legendastv.username = provider[2] settings.legendastv.password = provider[3] - else: - providers_list = None 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: |