mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
changing the extension breaks post process on mylar
works fine on mylar dev branch
This commit is contained in:
parent
79e4e2d740
commit
60559ffdc1
2 changed files with 7 additions and 10 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue