mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
Switched our config class to configObj.
nzbToMedia now fully performs manual runs for all autoProcessing scripts. autoProcessing categories are now sub-sections in the autoProcessingMedia.cfg file which allows you to have a unlimited amount of categories for your liking. nzbToMedia supports categories for all autoProcessing scripts now. Minor bug fixes and code cleanup performed during the re-code. Auto-migration code will convert old-style cfg files to new-style cfg format.
This commit is contained in:
parent
027c3e5a43
commit
b7fc74b3fd
22 changed files with 4473 additions and 572 deletions
|
@ -19,25 +19,23 @@ class autoProcessComics:
|
|||
Logger.info("Loading config from %s", config.CONFIG_FILE)
|
||||
|
||||
section = "Mylar"
|
||||
if inputCategory != None and config().has_section(inputCategory):
|
||||
section = inputCategory
|
||||
host = config().get(section, "host")
|
||||
port = config().get(section, "port")
|
||||
username = config().get(section, "username")
|
||||
password = config().get(section, "password")
|
||||
host = config()[section][inputCategory]["host"]
|
||||
port = config()[section][inputCategory]["port"]
|
||||
username = config()[section][inputCategory]["username"]
|
||||
password = config()[section][inputCategory]["password"]
|
||||
try:
|
||||
ssl = int(config().get(section, "ssl"))
|
||||
except (config.NoOptionError, ValueError):
|
||||
ssl = int(config()[section][inputCategory]["ssl"])
|
||||
except:
|
||||
ssl = 0
|
||||
|
||||
try:
|
||||
web_root = config().get(section, "web_root")
|
||||
except config.NoOptionError:
|
||||
web_root = config()[section][inputCategory]["web_root"]
|
||||
except:
|
||||
web_root = ""
|
||||
|
||||
try:
|
||||
watch_dir = config().get(section, "watch_dir")
|
||||
except config.NoOptionError:
|
||||
watch_dir = config()[section][inputCategory]["watch_dir"]
|
||||
except:
|
||||
watch_dir = ""
|
||||
params = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue