Browse Source

Fix NZB upload. Don't send api part when launching UI for running instance.

tags/0.6.1
ShyPike 14 years ago
parent
commit
05e0abbd5e
  1. 3
      SABnzbd.py
  2. 2
      sabnzbd/utils/upload.py

3
SABnzbd.py

@ -651,7 +651,8 @@ def check_for_sabnzbd(url, upload_nzbs):
upload_file(url, f)
else:
# Launch the web browser and quit since sabnzbd is already running
launch_a_browser(url.replace('api?', ''), force=True)
url = url[:url.rfind('/')+1]
launch_a_browser(url, force=True)
exit_sab(0)
return True
return False

2
sabnzbd/utils/upload.py

@ -37,7 +37,7 @@ def upload_file(url, fp):
apikey = cfg.api_key()
if apikey and 'apikey' not in url:
url = '%s&apikey=%s' % (url, apikey)
else:
if 'apikey' not in url:
# Use alternative login method
username = cfg.username()
password = cfg.password()

Loading…
Cancel
Save