mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Merge pull request #421 from vergessen/nightly
changing the extension breaks post process on mylar
This commit is contained in:
commit
48483b589c
2 changed files with 5 additions and 8 deletions
|
@ -505,7 +505,7 @@ def main(args, section=None):
|
||||||
|
|
||||||
# All checks done, now launching the script.
|
# All checks done, now launching the script.
|
||||||
clientAgent = 'nzbget'
|
clientAgent = 'nzbget'
|
||||||
result = process(os.environ['NZBPP_DIRECTORY'], inputName=os.environ['NZBPP_NZBFILENAME'], status=status,
|
result = process(os.environ['NZBPP_DIRECTORY'], inputName=os.environ['NZBPP_NZBNAME'], status=status,
|
||||||
clientAgent=clientAgent, download_id=download_id, inputCategory=os.environ['NZBPP_CATEGORY'])
|
clientAgent=clientAgent, download_id=download_id, inputCategory=os.environ['NZBPP_CATEGORY'])
|
||||||
# SABnzbd Pre 0.7.17
|
# SABnzbd Pre 0.7.17
|
||||||
elif len(args) == nzbtomedia.SABNZB_NO_OF_ARGUMENTS:
|
elif len(args) == nzbtomedia.SABNZB_NO_OF_ARGUMENTS:
|
||||||
|
@ -588,4 +588,4 @@ def main(args, section=None):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
exit(main(sys.argv))
|
exit(main(sys.argv))
|
||||||
|
|
|
@ -30,15 +30,14 @@ class autoProcessComics:
|
||||||
remote_path = 0
|
remote_path = 0
|
||||||
|
|
||||||
inputName, dirName = convert_to_ascii(inputName, dirName)
|
inputName, dirName = convert_to_ascii(inputName, dirName)
|
||||||
|
# replaceExtensions(dirName)
|
||||||
replaceExtensions(dirName)
|
|
||||||
|
|
||||||
clean_name, ext = os.path.splitext(inputName)
|
clean_name, ext = os.path.splitext(inputName)
|
||||||
if len(ext) == 4: # we assume this was a standrard extension.
|
if len(ext) == 4: # we assume this was a standrard extension.
|
||||||
inputName = clean_name
|
inputName = clean_name
|
||||||
|
|
||||||
params = {}
|
params = {}
|
||||||
params['nzb_folder'] = dirName
|
params['nzb_folder'] = dirName
|
||||||
|
|
||||||
if remote_path:
|
if remote_path:
|
||||||
params['nzb_folder'] = remoteDir(dirName)
|
params['nzb_folder'] = remoteDir(dirName)
|
||||||
|
|
||||||
|
@ -55,13 +54,11 @@ class autoProcessComics:
|
||||||
success = False
|
success = False
|
||||||
|
|
||||||
logger.debug("Opening URL: %s" % (url), section)
|
logger.debug("Opening URL: %s" % (url), section)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = requests.get(url, auth=(username, password), params=params, stream=True, verify=False)
|
r = requests.get(url, auth=(username, password), params=params, stream=True, verify=False)
|
||||||
except requests.ConnectionError:
|
except requests.ConnectionError:
|
||||||
logger.error("Unable to open URL", section)
|
logger.error("Unable to open URL", section)
|
||||||
return 1 # failure
|
return 1 # failure
|
||||||
|
|
||||||
for line in r.iter_lines():
|
for line in r.iter_lines():
|
||||||
if line: logger.postprocess("%s" % (line), section)
|
if line: logger.postprocess("%s" % (line), section)
|
||||||
if "Post Processing SUCCESSFUL!" in line: success = True
|
if "Post Processing SUCCESSFUL!" in line: success = True
|
||||||
|
@ -75,4 +72,4 @@ class autoProcessComics:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
logger.warning("The issue does not appear to have successfully processed. Please check your Logs",section)
|
logger.warning("The issue does not appear to have successfully processed. Please check your Logs",section)
|
||||||
return 1 # failure
|
return 1 # failure
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue