mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
allow manula run for Mylar. fixes #155
This commit is contained in:
parent
129f1ebb49
commit
2c59c64db6
3 changed files with 14 additions and 4 deletions
|
@ -55,10 +55,17 @@ def processEpisode(dirName, nzbName=None, status=0):
|
|||
except ConfigParser.NoOptionError:
|
||||
web_root = ""
|
||||
|
||||
try:
|
||||
watch_dir = config.get("Mylar", "watch_dir")
|
||||
except ConfigParser.NoOptionError:
|
||||
watch_dir = ""
|
||||
params = {}
|
||||
|
||||
if dirName == "Manual Run" and watch_dir != "":
|
||||
dirName = watch_dir
|
||||
|
||||
params['nzb_folder'] = dirName
|
||||
if nzbName != None:
|
||||
if nzbName != None and nzbName != "Manual Run":
|
||||
params['nzb_name'] = nzbName
|
||||
|
||||
myOpener = AuthURLOpener(username, password)
|
||||
|
|
|
@ -57,6 +57,7 @@ password=
|
|||
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||
web_root=
|
||||
ssl=0
|
||||
watch_dir =
|
||||
|
||||
|
||||
[Gamez]
|
||||
|
|
|
@ -172,8 +172,10 @@ elif len(sys.argv) == NZBGET_NO_OF_ARGUMENTS:
|
|||
Logger.info("Script triggered from NZBGet, starting autoProcessComics...")
|
||||
result = autoProcessComics.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||
else:
|
||||
Logger.warn("Invalid number of arguments received from client. Exiting")
|
||||
sys.exit(-1)
|
||||
|
||||
Logger.warn("Invalid number of arguments received from client.")
|
||||
Logger.info("Running autoProcessComics as a manual run...")
|
||||
result = autoProcessComics.processEpisode('Manual Run', 'Manual Run', 0)
|
||||
|
||||
if result == 0:
|
||||
Logger.info("MAIN: The autoProcessComics script completed successfully.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue