changing the extension breaks post process on mylar

works fine on mylar dev branch
This commit is contained in:
vergessen 2014-06-05 20:03:36 -05:00
commit 60559ffdc1
2 changed files with 7 additions and 10 deletions

View file

@ -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:

View file

@ -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
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