Add Stheno fork

This commit is contained in:
Labrys of Knossos 2018-12-31 11:30:16 -05:00
commit 4dadd905c8
3 changed files with 5 additions and 1 deletions

View file

@ -72,6 +72,7 @@ FORK_SICKCHILL = 'SickChill'
FORK_SICKBEARD_API = 'SickBeard-api' FORK_SICKBEARD_API = 'SickBeard-api'
FORK_MEDUSA = 'Medusa' FORK_MEDUSA = 'Medusa'
FORK_SICKGEAR = 'SickGear' FORK_SICKGEAR = 'SickGear'
FORK_STHENO = 'Stheno'
FORKS[FORK_DEFAULT] = {'dir': None} FORKS[FORK_DEFAULT] = {'dir': None}
FORKS[FORK_FAILED] = {'dirName': None, 'failed': None} FORKS[FORK_FAILED] = {'dirName': None, 'failed': None}
FORKS[FORK_FAILED_TORRENT] = {'dir': None, 'failed': None, 'process_method': None} FORKS[FORK_FAILED_TORRENT] = {'dir': None, 'failed': None, 'process_method': None}
@ -80,6 +81,7 @@ FORKS[FORK_SICKCHILL] = {'proc_dir': None, 'failed': None, 'process_method': Non
FORKS[FORK_SICKBEARD_API] = {'path': None, 'failed': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'delete': None, 'force_next': None} FORKS[FORK_SICKBEARD_API] = {'path': None, 'failed': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'delete': None, 'force_next': None}
FORKS[FORK_MEDUSA] = {'proc_dir': None, 'failed': None, 'process_method': None, 'force': None, 'delete_on': None, 'ignore_subs': None} FORKS[FORK_MEDUSA] = {'proc_dir': None, 'failed': None, 'process_method': None, 'force': None, 'delete_on': None, 'ignore_subs': None}
FORKS[FORK_SICKGEAR] = {'dir': None, 'failed': None, 'process_method': None, 'force': None} FORKS[FORK_SICKGEAR] = {'dir': None, 'failed': None, 'process_method': None, 'force': None}
FORKS[FORK_STHENO] = {"proc_dir": None, "failed": None, "process_method": None, "force": None, "delete_on": None, "ignore_subs": None}
ALL_FORKS = {k: None for k in set(list(itertools.chain.from_iterable([FORKS[x].keys() for x in FORKS.keys()])))} ALL_FORKS = {k: None for k in set(list(itertools.chain.from_iterable([FORKS[x].keys() for x in FORKS.keys()])))}
# NZBGet Exit Codes # NZBGet Exit Codes

View file

@ -250,6 +250,8 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
if section == 'SickBeard': if section == 'SickBeard':
if apikey: if apikey:
url = '{0}{1}:{2}{3}/api/{4}/?cmd=postprocess'.format(protocol, host, port, web_root, apikey) url = '{0}{1}:{2}{3}/api/{4}/?cmd=postprocess'.format(protocol, host, port, web_root, apikey)
elif fork == 'Stheno':
url = "{0}{1}:{2}{3}/home/postprocess/process_episode".format(protocol, host, port, web_root)
else: else:
url = '{0}{1}:{2}{3}/home/postprocess/processEpisode'.format(protocol, host, port, web_root) url = '{0}{1}:{2}{3}/home/postprocess/processEpisode'.format(protocol, host, port, web_root)
elif section == 'NzbDrone': elif section == 'NzbDrone':

View file

@ -20,7 +20,7 @@ def auto_fork(section, input_category):
apikey = cfg.get('apikey') apikey = cfg.get('apikey')
ssl = int(cfg.get('ssl', 0)) ssl = int(cfg.get('ssl', 0))
web_root = cfg.get('web_root', '') web_root = cfg.get('web_root', '')
replace = {'sickrage': 'SickRage', 'sickchill': 'SickChill', 'sickgear': 'SickGear', 'medusa': 'Medusa', 'sickbeard-api': 'SickBeard-api'} replace = {'sickrage': 'SickRage', 'sickchill': 'SickChill', 'sickgear': 'SickGear', 'medusa': 'Medusa', 'sickbeard-api': 'SickBeard-api', 'stheno': 'Stheno'}
f1 = replace[cfg.get('fork', 'auto')] if cfg.get('fork', 'auto') in replace else cfg.get('fork', 'auto') f1 = replace[cfg.get('fork', 'auto')] if cfg.get('fork', 'auto') in replace else cfg.get('fork', 'auto')
try: try:
fork = f1, core.FORKS[f1] fork = f1, core.FORKS[f1]