Merge Nightly (#1783)

* Add Failed to SickGear fork detection (#1772)

* Fix for failed passed as 2,3 from SAB (#1777)

* Fix DB import (#1779)

* Sqlite3.row handling fix
* Fix import error in Python3

* make nzbToWatcher.py executable. #1780

* Update to V12.1.07 (#1782)
This commit is contained in:
Clinton Hall 2020-09-23 16:08:32 +12:00 committed by GitHub
parent f92f8f3952
commit b9c3ccb71d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 12 deletions

View file

@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 12.1.06 current_version = 12.1.07
commit = True commit = True
tag = False tag = False

View file

@ -333,9 +333,9 @@ def main(args):
(os.path.basename(dir_name))) (os.path.basename(dir_name)))
core.DOWNLOAD_INFO = core.get_download_info(os.path.basename(dir_name), 0) core.DOWNLOAD_INFO = core.get_download_info(os.path.basename(dir_name), 0)
if core.DOWNLOAD_INFO: if core.DOWNLOAD_INFO:
client_agent = text_type(core.DOWNLOAD_INFO[0].get('client_agent', 'manual')) client_agent = text_type(core.DOWNLOAD_INFO[0]['client_agent']) or 'manual'
input_hash = text_type(core.DOWNLOAD_INFO[0].get('input_hash', '')) input_hash = text_type(core.DOWNLOAD_INFO[0]['input_hash']) or ''
input_id = text_type(core.DOWNLOAD_INFO[0].get('input_id', '')) input_id = text_type(core.DOWNLOAD_INFO[0]['input_id']) or ''
logger.info('Found download info for {0}, ' logger.info('Found download info for {0}, '
'setting variables now ...'.format(os.path.basename(dir_name))) 'setting variables now ...'.format(os.path.basename(dir_name)))
else: else:

View file

@ -83,7 +83,7 @@ from core.utils import (
wake_up, wake_up,
) )
__version__ = '12.1.06' __version__ = '12.1.07'
# Client Agents # Client Agents
NZB_CLIENTS = ['sabnzbd', 'nzbget', 'manual'] NZB_CLIENTS = ['sabnzbd', 'nzbget', 'manual']
@ -118,7 +118,7 @@ FORKS = {
FORK_MEDUSA: {'proc_dir': None, 'failed': None, 'process_method': None, 'force': None, 'delete_on': None, 'ignore_subs': None}, FORK_MEDUSA: {'proc_dir': None, 'failed': None, 'process_method': None, 'force': None, 'delete_on': None, 'ignore_subs': None},
FORK_MEDUSA_API: {'path': None, 'failed': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'delete_files': None, 'is_priority': None, 'cmd': 'postprocess'}, FORK_MEDUSA_API: {'path': None, 'failed': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'delete_files': None, 'is_priority': None, 'cmd': 'postprocess'},
FORK_SICKGEAR: {'dir': None, 'failed': None, 'process_method': None, 'force': None}, FORK_SICKGEAR: {'dir': None, 'failed': None, 'process_method': None, 'force': None},
FORK_SICKGEAR_API: {'path': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'is priority': None, 'cmd': 'sg.postprocess'}, FORK_SICKGEAR_API: {'path': None, 'process_method': None, 'force_replace': None, 'return_data': None, 'type': None, 'is priority': None, 'failed': None, 'cmd': 'sg.postprocess'},
FORK_STHENO: {'proc_dir': None, 'failed': None, 'process_method': None, 'force': None, 'delete_on': None, 'ignore_subs': None}, 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()])))}

View file

@ -188,6 +188,8 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
for param in copy.copy(fork_params): for param in copy.copy(fork_params):
if param == 'failed': if param == 'failed':
if failed > 1:
failed = 1
fork_params[param] = failed fork_params[param] = failed
if 'proc_type' in fork_params: if 'proc_type' in fork_params:
del fork_params['proc_type'] del fork_params['proc_type']

View file

@ -97,7 +97,7 @@ class Authentication:
req_param['_sid'] = self._sid req_param['_sid'] = self._sid
if method is 'get': if method == 'get':
url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name
response = requests.get(url, req_param) response = requests.get(url, req_param)
@ -106,7 +106,7 @@ class Authentication:
else: else:
return response return response
elif method is 'post': elif method == 'post':
url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name
response = requests.post(url, req_param) response = requests.post(url, req_param)

View file

@ -1016,8 +1016,8 @@ def main(args, section=None):
logger.info('Found download info for {0}, ' logger.info('Found download info for {0}, '
'setting variables now ...'.format 'setting variables now ...'.format
(os.path.basename(dir_name))) (os.path.basename(dir_name)))
client_agent = text_type(core.DOWNLOAD_INFO[0].get('client_agent', 'manual')) client_agent = text_type(core.DOWNLOAD_INFO[0]['client_agent']) or 'manual'
download_id = text_type(core.DOWNLOAD_INFO[0].get('input_id', '')) download_id = text_type(core.DOWNLOAD_INFO[0]['input_id']) or ''
else: else:
logger.info('Unable to locate download info for {0}, ' logger.info('Unable to locate download info for {0}, '
'continuing to try and process this release ...'.format 'continuing to try and process this release ...'.format

0
nzbToWatcher3.py Normal file → Executable file
View file

View file

@ -23,7 +23,7 @@ def read(*names, **kwargs):
setup( setup(
name='nzbToMedia', name='nzbToMedia',
version='12.1.06', version='12.1.07',
license='GPLv3', license='GPLv3',
description='Efficient on demand post processing', description='Efficient on demand post processing',
long_description=""" long_description="""