Add rest providers config

pull/292/head
Halali 6 years ago
parent ab4bbc35dd
commit e561889902

@ -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)

@ -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

@ -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)

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
Loading…
Cancel
Save