diff --git a/nzbToMedia.py b/nzbToMedia.py index e9c81666..3258cecb 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -505,7 +505,7 @@ def main(args, section=None): # All checks done, now launching the script. 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']) # SABnzbd Pre 0.7.17 elif len(args) == nzbtomedia.SABNZB_NO_OF_ARGUMENTS: @@ -588,4 +588,4 @@ def main(args, section=None): if __name__ == '__main__': - exit(main(sys.argv)) \ No newline at end of file + exit(main(sys.argv)) diff --git a/nzbtomedia/autoProcess/autoProcessComics.py b/nzbtomedia/autoProcess/autoProcessComics.py index 1610c457..278a78ab 100644 --- a/nzbtomedia/autoProcess/autoProcessComics.py +++ b/nzbtomedia/autoProcess/autoProcessComics.py @@ -30,15 +30,14 @@ class autoProcessComics: remote_path = 0 inputName, dirName = convert_to_ascii(inputName, dirName) - - replaceExtensions(dirName) - +# replaceExtensions(dirName) clean_name, ext = os.path.splitext(inputName) - if len(ext) == 4: # we assume this was a standrard extension. - inputName = clean_name + if len(ext) == 4: # we assume this was a standrard extension. + inputName = clean_name params = {} params['nzb_folder'] = dirName + if remote_path: params['nzb_folder'] = remoteDir(dirName) @@ -55,13 +54,11 @@ class autoProcessComics: success = False logger.debug("Opening URL: %s" % (url), section) - try: r = requests.get(url, auth=(username, password), params=params, stream=True, verify=False) except requests.ConnectionError: logger.error("Unable to open URL", section) return 1 # failure - for line in r.iter_lines(): if line: logger.postprocess("%s" % (line), section) if "Post Processing SUCCESSFUL!" in line: success = True @@ -75,4 +72,4 @@ class autoProcessComics: return 0 else: logger.warning("The issue does not appear to have successfully processed. Please check your Logs",section) - return 1 # failure \ No newline at end of file + return 1 # failure