From e561889902fc1269e8013a7470a6aacf2e39057b Mon Sep 17 00:00:00 2001 From: Halali Date: Fri, 4 Jan 2019 21:01:18 +0100 Subject: [PATCH] Add rest providers config --- bazarr/config.py | 7 ++++++- bazarr/get_providers.py | 37 +++++++++++++++++++++++++------------ bazarr/main.py | 1 + data/cache/.gitignore | 4 ---- 4 files changed, 32 insertions(+), 17 deletions(-) delete mode 100644 data/cache/.gitignore diff --git a/bazarr/config.py b/bazarr/config.py index a7a5995d0..0f40dedd7 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -67,9 +67,11 @@ defaults = { 'opensubtitles': { 'username': '', 'password': '', + 'use_tag_search': 'False', 'vip': 'False', 'ssl': 'False', - 'timeout': '15' + 'timeout': '15', + 'skip_wrong_fps': 'False' }, 'addic7ed': { 'username': '', @@ -79,6 +81,9 @@ defaults = { 'legendastv': { 'username': '', 'password': '' +}, + 'assrt': { + 'token': '' }} settings = simpleconfigparser(defaults=defaults) diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index 361e848aa..0159f476e 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -15,19 +15,32 @@ def get_providers(): def get_providers_auth(): providers_auth = { - 'addic7ed': {'username': settings.addic7ed.username, - 'password': settings.addic7ed.password, - 'use_random_agents': settings.addic7ed.getboolean('random_agents'), + 'addic7ed': {'username': settings.addic7ed.username, + 'password': settings.addic7ed.password, + 'use_random_agents': settings.addic7ed.getboolean('random_agents'), }, - 'opensubtitles': {'username': settings.opensubtitles.username, - 'password': settings.opensubtitles.password, - 'is_vip': settings.opensubtitles.getboolean('vip'), - 'use_ssl': settings.opensubtitles.getboolean('ssl'), - 'timeout': int(settings.opensubtitles.timeout) or 15, + 'opensubtitles': {'username': settings.opensubtitles.username, + 'password': settings.opensubtitles.password, + 'use_tag_search': settings.opensubtitles.getboolean('use_tag_search'), + 'only_foreign': False, # fixme + 'also_foreign': False, # fixme + 'is_vip': settings.opensubtitles.getboolean('vip'), + 'use_ssl': settings.opensubtitles.getboolean('ssl'), + 'timeout': int(settings.opensubtitles.timeout) or 15, + 'skip_wrong_fps': settings.opensubtitles.getboolean('skip_wrong_fps'), }, - 'legendastv': {'username': settings.legendastv.username, - 'password': settings.legendastv.password, - } - } + 'podnapisi': { + 'only_foreign': False, # fixme + 'also_foreign': False, # fixme + }, + 'subscene': { + 'only_foreign': False, # fixme + }, + 'legendastv': {'username': settings.legendastv.username, + 'password': settings.legendastv.password, + }, + 'assrt': {'token': settings.assrt.token, } + } + return providers_auth diff --git a/bazarr/main.py b/bazarr/main.py index f64ad9858..7973e0837 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -46,6 +46,7 @@ from utils import history_log, history_log_movie from scheduler import * from notifier import send_notifications, send_notifications_movie from config import settings, url_sonarr, url_radarr, url_radarr_short, url_sonarr_short, base_url +from helper import path_replace_movie from subliminal_patch.extensions import provider_registry as provider_manager reload(sys) diff --git a/data/cache/.gitignore b/data/cache/.gitignore deleted file mode 100644 index 86d0cb272..000000000 --- a/data/cache/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file