mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Fixed enable/disable check.
Added few more helper functions to our config class.
This commit is contained in:
parent
191be4ea57
commit
c9898e0e87
14 changed files with 53 additions and 49 deletions
|
@ -15,12 +15,8 @@ class autoProcessComics:
|
|||
return 1 # failure
|
||||
|
||||
# auto-detect correct section
|
||||
secCount, section = [x for x in enumerate(config.issubsection(inputCategory)) if int(config()[x[1]][inputCategory]['enabled']) == 1][0]
|
||||
if secCount > 1:
|
||||
Logger.error(
|
||||
"MAIN: You can't have multiple sub-sections with the same name enabled, fix your autoProcessMedia.cfg file.")
|
||||
return 1
|
||||
elif secCount == 0:
|
||||
section = config.issubsection(inputCategory, checkenabled=True)
|
||||
if len(section) == 0:
|
||||
Logger.error(
|
||||
"MAIN: We were unable to find a processor for category %s that was enabled, please check your autoProcessMedia.cfg file.", inputCategory)
|
||||
return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue