Fix other sickbeard forks errorring. (#1813)

Co-authored-by: p0psicles <rogier@headshots.nl>
This commit is contained in:
Clinton Hall 2021-02-15 21:28:25 +13:00 committed by GitHub
commit f48812eccd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -310,7 +310,7 @@ class InitSickBeard(object):
logger.debug('Create object for fork {fork}'.format(fork=self.fork))
if self.fork and mapped_forks.get(self.fork):
# Create the fork object and pass self (SickBeardInit) to it for all the data, like Config.
self.fork = mapped_forks[self.fork](self)
self.fork_obj = mapped_forks[self.fork](self)
else:
logger.info('{section}:{category} Could not create a fork object for {fork}. Probaly class not added yet.'.format(
section=self.section, category=self.input_category, fork=self.fork)

View file

@ -192,7 +192,8 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
)
# Part of the refactor
init_sickbeard.fork.initialize(dir_name, input_name, failed, client_agent='manual')
if init_sickbeard.fork_obj:
init_sickbeard.fork_obj.initialize(dir_name, input_name, failed, client_agent='manual')
# configure SB params to pass
fork_params['quiet'] = 1
@ -321,8 +322,8 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
try:
if section == 'SickBeard':
if init_sickbeard.fork:
r = init_sickbeard.fork.api_call()
if init_sickbeard.fork_obj:
r = init_sickbeard.fork_obj.api_call()
else:
s = requests.Session()