mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
No status change error suppression (#1786)
This commit is contained in:
parent
4c33b5574b
commit
a96f07c261
2 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,8 @@
|
||||||
method = renamer
|
method = renamer
|
||||||
delete_failed = 0
|
delete_failed = 0
|
||||||
wait_for = 2
|
wait_for = 2
|
||||||
|
# Set this to suppress error if no status change after rename called
|
||||||
|
no_status_check = 0
|
||||||
extract = 1
|
extract = 1
|
||||||
# Set this to minimum required size to consider a media file valid (in MB)
|
# Set this to minimum required size to consider a media file valid (in MB)
|
||||||
minSize = 0
|
minSize = 0
|
||||||
|
|
|
@ -59,6 +59,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||||
remote_path = int(cfg.get('remote_path', 0))
|
remote_path = int(cfg.get('remote_path', 0))
|
||||||
protocol = 'https://' if ssl else 'http://'
|
protocol = 'https://' if ssl else 'http://'
|
||||||
omdbapikey = cfg.get('omdbapikey', '')
|
omdbapikey = cfg.get('omdbapikey', '')
|
||||||
|
no_status_check = int(cfg.get('no_status_check', 0))
|
||||||
status = int(status)
|
status = int(status)
|
||||||
if status > 0 and core.NOEXTRACTFAILED:
|
if status > 0 and core.NOEXTRACTFAILED:
|
||||||
extract = 0
|
extract = 0
|
||||||
|
@ -465,6 +466,11 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||||
'{0} does not appear to have changed status after {1} minutes, Please check your logs.'.format(input_name, wait_for),
|
'{0} does not appear to have changed status after {1} minutes, Please check your logs.'.format(input_name, wait_for),
|
||||||
section,
|
section,
|
||||||
)
|
)
|
||||||
|
if no_status_check:
|
||||||
|
return ProcessResult(
|
||||||
|
status_code=0,
|
||||||
|
message='{0}: Successfully processed but no change in status confirmed'.format(section),
|
||||||
|
)
|
||||||
return ProcessResult(
|
return ProcessResult(
|
||||||
status_code=1,
|
status_code=1,
|
||||||
message='{0}: Failed to post-process - No change in status'.format(section),
|
message='{0}: Failed to post-process - No change in status'.format(section),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue