Fixed a bunch of issues that where present in TorrentToMedia and our config class including the migration code.

Added in manual run for TorrentToMedia.

All autoProcessing scripts now auto-detect the correct section based on sub-section.

NzbDrone support is 90% done but is not functional ... YET!

Lots more I'm sure but I wanted this released for those that where having issues.
This commit is contained in:
echel0n 2014-04-07 01:42:55 -07:00
commit 7d4ccf53cc
17 changed files with 715 additions and 305 deletions

View file

@ -13,13 +13,24 @@ class autoProcessGames:
Logger.error("No directory was given!")
return 1 # failure
# auto-detect correct section
section = [x for x in config.issubsection(inputCategory) if config()[x][inputCategory]['enabled'] == 1]
if len(section) > 1:
Logger.error(
"MAIN: You can't have multiple sub-sections with the same name enabled, fix your autoProcessMedia.cfg file.")
return 1
elif 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
socket.setdefaulttimeout(int(config.NZBTOMEDIA_TIMEOUT)) #initialize socket timeout.
Logger.info("Loading config from %s", config.CONFIG_FILE)
status = int(status)
section = "Gamez"
host = config()[section][inputCategory]["host"]
port = config()[section][inputCategory]["port"]
apikey = config()[section][inputCategory]["apikey"]