Merge pull request #11 from jackrobison/master

Update daemon and uri handler
This commit is contained in:
jackrobison 2016-01-22 09:45:34 -05:00
commit 82944bc103
3 changed files with 31 additions and 3 deletions

View file

@ -0,0 +1,21 @@
import xmlrpclib
def main():
daemon = xmlrpclib.ServerProxy("http://localhost:7080/")
try:
b = daemon.get_balance()
is_running = True
except:
is_running = False
if is_running:
try:
daemon.stop()
except:
print "LBRYnet daemon stopped"
else:
print "LBRYnet daemon wasn't running"
if __name__ == '__main__':
main()

View file

@ -15,11 +15,17 @@ def main(args):
daemon = xmlrpclib.ServerProxy('http://localhost:7080/')
try:
b = daemon.get_balance()
is_running = True
except:
webbrowser.open('http://lbry.io/get')
is_running = False
if len(args) > 1:
print 'Too many args', args
else:
elif is_running:
if args[0][7:] == 'lbry':
daemon.render_gui()

View file

@ -22,6 +22,7 @@ setup(name='lbrynet',
'lbrynet-lookup-hosts-for-hash = lbrynet.dht_scripts:get_hosts_for_hash_in_dht',
'lbrynet-announce_hash_to_dht = lbrynet.dht_scripts:announce_hash_to_dht',
'lbrynet-daemon = lbrynet.lbrynet_daemon.LBRYDaemon:main',
'stop-lbrynet-daemon = lbrynet.lbrynet_daemon.LBRYDaemonStopper:main',
]
},
data_files=[
@ -43,4 +44,4 @@ setup(name='lbrynet',
]
)
]
)
)