From 99b3cdd45ddf88cede391c01497ec6d5aee3c5e1 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 17 Apr 2016 20:16:35 -0400 Subject: [PATCH] default on launching ui if daemon already running when command is called -also update deb version --- lbrynet/lbrynet_daemon/LBRYDaemonControl.py | 6 ++++-- packaging/ubuntu/lbry.desktop | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lbrynet/lbrynet_daemon/LBRYDaemonControl.py b/lbrynet/lbrynet_daemon/LBRYDaemonControl.py index 5fc6f98ff..d04133144 100644 --- a/lbrynet/lbrynet_daemon/LBRYDaemonControl.py +++ b/lbrynet/lbrynet_daemon/LBRYDaemonControl.py @@ -74,9 +74,13 @@ def start(): parser.add_argument('--no-launch', dest='launchui', action="store_false") parser.set_defaults(launchui=True) + args = parser.parse_args() + try: JSONRPCProxy.from_url(API_CONNECTION_STRING).is_running() log.info("lbrynet-daemon is already running") + if args.launchui: + webbrowser.open(UI_ADDRESS) return except: pass @@ -88,8 +92,6 @@ def start(): print "JSONRPC API is available at " + API_CONNECTION_STRING print "To quit press ctrl-c or call 'stop' via the API" - args = parser.parse_args() - if args.branch == "HEAD": GIT_CMD_STRING = "git ls-remote https://github.com/lbryio/lbry-web-ui.git | grep %s | cut -f 1" % args.branch DIST_URL = "https://raw.githubusercontent.com/lbryio/lbry-web-ui/master/dist.zip" diff --git a/packaging/ubuntu/lbry.desktop b/packaging/ubuntu/lbry.desktop index f034b97c6..d5c029ec6 100644 --- a/packaging/ubuntu/lbry.desktop +++ b/packaging/ubuntu/lbry.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=0.2.1 +Version=0.2.2 Name=LBRY # Only KDE 4 seems to use GenericName, so we reuse the KDE strings. # From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.