From 06d91c6928fbe7d02cf90d85e19579a63853fca6 Mon Sep 17 00:00:00 2001 From: p0ps Date: Thu, 18 Feb 2021 02:30:51 +0100 Subject: [PATCH] Pymedusa (#1815) * Add wait_for as a valid option for pyMedusa * Add docs. * doc * wrong section --- autoProcessMedia.cfg.spec | 2 ++ core/auto_process/managers/pymedusa.py | 2 +- core/configuration.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index d7ee9be7..479a6949 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -183,6 +183,8 @@ watch_dir = ##### Set the recursive directory permissions to the following (0 to disable) chmodDirectory = 0 + ##### pyMedusa (fork=medusa-apiv2) uses async postprocessing. Wait a maximum of x minutes for a pp result + wait_for = 10 [SiCKRAGE] #### autoProcessing for TV Series diff --git a/core/auto_process/managers/pymedusa.py b/core/auto_process/managers/pymedusa.py index 83a9e478..31d8d896 100644 --- a/core/auto_process/managers/pymedusa.py +++ b/core/auto_process/managers/pymedusa.py @@ -120,7 +120,7 @@ class PyMedusaApiV2(SickBeard): queueitem_identifier = jdata['queueItem']['identifier'] - wait_for = self.sb_init.config.get('wait_for', 2) + wait_for = int(self.sb_init.config.get('wait_for', 2)) n = 0 response = {} url = '{0}/{1}'.format(url, queueitem_identifier) diff --git a/core/configuration.py b/core/configuration.py index 1765bf81..0f3b6278 100644 --- a/core/configuration.py +++ b/core/configuration.py @@ -178,7 +178,7 @@ class ConfigObj(configobj.ConfigObj, Section): if section in ['CouchPotato', 'HeadPhones', 'Gamez', 'Mylar']: if option in ['username', 'password']: values.pop(option) - if section in ['SickBeard', 'Mylar']: + if section in ['Mylar']: if option == 'wait_for': # remove old format values.pop(option) if section in ['SickBeard', 'NzbDrone']: