mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 05:01:10 -07:00
More small fixes
This commit is contained in:
parent
ce543cdcb9
commit
5c264f0405
7 changed files with 18 additions and 18 deletions
|
@ -241,7 +241,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToCouchPotato running %s:%s as a manual run...", section, subsection)
|
||||
results = autoProcessMovie.process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessMovie().process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, subsection)
|
||||
|
|
|
@ -171,7 +171,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToGamez running %s:%s as a manual run...", section, category)
|
||||
results = autoProcessGames.process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessGames().process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
|
|
|
@ -181,7 +181,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToHeadPhones running %s:%s as a manual run...", section, category)
|
||||
results = autoProcessMusic.process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessMusic().process(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
|
|
|
@ -173,7 +173,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToMylar running %s:%s as a manual run...", section, category)
|
||||
results = autoProcessComics.processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessComics().processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
|
|
|
@ -205,7 +205,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbToNzbDrone running %s:%s as a manual run...", section, category)
|
||||
results = autoProcessTV.processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessTV().processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
|
|
|
@ -238,7 +238,7 @@ else:
|
|||
dirNames = get_dirnames(section, category)
|
||||
for dirName in dirNames:
|
||||
Logger.info("MAIN: nzbTo%s running %s:%s as a manual run...", section, section, category)
|
||||
results = autoProcessTV.processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
results = autoProcessTV().processEpisode(dirName, os.path.basename(dirName), 0, inputCategory=category)
|
||||
if results != 0:
|
||||
result = results
|
||||
Logger.info("MAIN: A problem was reported when trying to manually run %s:%s.", section, category)
|
||||
|
|
|
@ -5,37 +5,37 @@ from lib import requests
|
|||
|
||||
from nzbToMediaConfig import config
|
||||
|
||||
def autoFork(section, category):
|
||||
def autoFork(section, inputCategory):
|
||||
|
||||
Logger = logging.getLogger()
|
||||
|
||||
# config settings
|
||||
try:
|
||||
host = config()[section][category]["host"]
|
||||
port = config()[section][category]["port"]
|
||||
host = config()[section][inputCategory]["host"]
|
||||
port = config()[section][inputCategory]["port"]
|
||||
except:
|
||||
host = None
|
||||
port = None
|
||||
|
||||
try:
|
||||
username = config()[section][category]["username"]
|
||||
password = config()[section][category]["password"]
|
||||
username = config()[section][inputCategory]["username"]
|
||||
password = config()[section][inputCategory]["password"]
|
||||
except:
|
||||
username = None
|
||||
password = None
|
||||
|
||||
try:
|
||||
ssl = int(config()[section][category]["ssl"])
|
||||
ssl = int(config()[section][inputCategory]["ssl"])
|
||||
except (config, ValueError):
|
||||
ssl = 0
|
||||
|
||||
try:
|
||||
web_root = config()[section][category]["web_root"]
|
||||
web_root = config()[section][inputCategory]["web_root"]
|
||||
except config:
|
||||
web_root = ""
|
||||
|
||||
try:
|
||||
fork = config.FORKS.items()[config.FORKS.keys().index(config()[section][category]["fork"])]
|
||||
fork = config.FORKS.items()[config.FORKS.keys().index(config()[section][inputCategory]["fork"])]
|
||||
except:
|
||||
fork = "auto"
|
||||
|
||||
|
@ -57,7 +57,7 @@ def autoFork(section, category):
|
|||
else:
|
||||
r = requests.get(url)
|
||||
except requests.ConnectionError:
|
||||
Logger.info("Could not connect to " + section + ":" + category + " to perform auto-fork detection!")
|
||||
Logger.info("Could not connect to " + section + ":" + inputCategory + " to perform auto-fork detection!")
|
||||
break
|
||||
|
||||
if r.ok:
|
||||
|
@ -65,10 +65,10 @@ def autoFork(section, category):
|
|||
break
|
||||
|
||||
if detected:
|
||||
Logger.info("" + section + ":" + category + " fork auto-detection successful ...")
|
||||
Logger.info("" + section + ":" + inputCategory + " fork auto-detection successful ...")
|
||||
else:
|
||||
Logger.info("" + section + ":" + category + " fork auto-detection failed")
|
||||
Logger.info("" + section + ":" + inputCategory + " fork auto-detection failed")
|
||||
fork = config.FORKS.items()[config.FORKS.keys().index(config.FORK_DEFAULT)]
|
||||
|
||||
Logger.info("" + section + ":" + category + " fork set to %s", fork[0])
|
||||
Logger.info("" + section + ":" + inputCategory + " fork set to %s", fork[0])
|
||||
return fork[0], fork[1]
|
Loading…
Add table
Add a link
Reference in a new issue