mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
add category centric processing. fixes #230
This commit is contained in:
parent
c98604c618
commit
6fe287df0d
8 changed files with 135 additions and 95 deletions
|
@ -13,7 +13,7 @@ from nzbToMediaUtil import *
|
|||
|
||||
Logger = logging.getLogger()
|
||||
|
||||
def process(dirName, nzbName=None, status=0):
|
||||
def process(dirName, nzbName=None, status=0, inputCategory=None):
|
||||
|
||||
status = int(status)
|
||||
config = ConfigParser.ConfigParser()
|
||||
|
@ -26,17 +26,21 @@ def process(dirName, nzbName=None, status=0):
|
|||
|
||||
config.read(configFilename)
|
||||
|
||||
host = config.get("Gamez", "host")
|
||||
port = config.get("Gamez", "port")
|
||||
apikey = config.get("Gamez", "apikey")
|
||||
section = "Gamez"
|
||||
if inputCategory != None and config.has_section(inputCategory):
|
||||
section = inputCategory
|
||||
|
||||
host = config.get(section, "host")
|
||||
port = config.get(section, "port")
|
||||
apikey = config.get(section, "apikey")
|
||||
|
||||
try:
|
||||
ssl = int(config.get("Gamez", "ssl"))
|
||||
ssl = int(config.get(section, "ssl"))
|
||||
except (ConfigParser.NoOptionError, ValueError):
|
||||
ssl = 0
|
||||
|
||||
try:
|
||||
web_root = config.get("Gamez", "web_root")
|
||||
web_root = config.get(section, "web_root")
|
||||
except ConfigParser.NoOptionError:
|
||||
web_root = ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue