mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
Fixes for user_script categories. #1643
This commit is contained in:
parent
9d05d6c914
commit
0e23991724
1 changed files with 12 additions and 9 deletions
|
@ -76,16 +76,19 @@ def process_torrent(input_directory, input_name, input_category, input_hash, inp
|
|||
|
||||
# auto-detect section
|
||||
section = core.CFG.findsection(input_category).isenabled()
|
||||
if section is None:
|
||||
section = core.CFG.findsection('ALL').isenabled()
|
||||
if section is None:
|
||||
logger.error('Category:[{0}] is not defined or is not enabled. '
|
||||
'Please rename it or ensure it is enabled for the appropriate section '
|
||||
'in your autoProcessMedia.cfg and try again.'.format
|
||||
(input_category))
|
||||
return [-1, '']
|
||||
if section is None: #Check for user_scripts for 'ALL' and 'UNCAT'
|
||||
if usercat in core.CATEGORIES:
|
||||
section = core.CFG.findsection('ALL').isenabled()
|
||||
usercat = 'ALL'
|
||||
else:
|
||||
usercat = 'ALL'
|
||||
section = core.CFG.findsection('UNCAT').isenabled()
|
||||
usercat = 'UNCAT'
|
||||
if section is None: # We haven't found any categories to process.
|
||||
logger.error('Category:[{0}] is not defined or is not enabled. '
|
||||
'Please rename it or ensure it is enabled for the appropriate section '
|
||||
'in your autoProcessMedia.cfg and try again.'.format
|
||||
(input_category))
|
||||
return [-1, '']
|
||||
|
||||
if len(section) > 1:
|
||||
logger.error('Category:[{0}] is not unique, {1} are using it. '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue