Browse Source

Launch browser for a second instance when no -b parameter is given.

This means that browser launch is always active when using the standard shortcut.
Only an explicit -b0 will suppress the launch.
tags/0.6.7
ShyPike 14 years ago
parent
commit
3e6f46483c
  1. 4
      SABnzbd.py

4
SABnzbd.py

@ -643,7 +643,10 @@ def find_free_port(host, currentport):
def check_for_sabnzbd(url, upload_nzbs, allow_browser=True): def check_for_sabnzbd(url, upload_nzbs, allow_browser=True):
""" Check for a running instance of sabnzbd(same version) on this port """ Check for a running instance of sabnzbd(same version) on this port
allow_browser==True|None will launch the browser, False will not.
""" """
if allow_browser is None:
allow_browser = True
if is_sabnzbd_running(url): if is_sabnzbd_running(url):
# Upload any specified nzb files to the running instance # Upload any specified nzb files to the running instance
if upload_nzbs: if upload_nzbs:
@ -652,6 +655,7 @@ def check_for_sabnzbd(url, upload_nzbs, allow_browser=True):
upload_file(url, f) upload_file(url, f)
else: else:
# Launch the web browser and quit since sabnzbd is already running # Launch the web browser and quit since sabnzbd is already running
# Trim away everything after the final slash in the URL
url = url[:url.rfind('/')+1] url = url[:url.rfind('/')+1]
launch_a_browser(url, force=allow_browser) launch_a_browser(url, force=allow_browser)
exit_sab(0) exit_sab(0)

Loading…
Cancel
Save