mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-12 09:55:31 +00:00
Moved switch to allow stopping client on starting player
This commit is contained in:
parent
7392c48158
commit
a547646704
@ -301,12 +301,12 @@ class SyncplayClient(object):
|
|||||||
def start(self, host, port):
|
def start(self, host, port):
|
||||||
if self._running:
|
if self._running:
|
||||||
return
|
return
|
||||||
|
self._running = True
|
||||||
if self._playerClass:
|
if self._playerClass:
|
||||||
self._playerClass.run(self, self._startupArgs.player_path, self._startupArgs.file, self._startupArgs._args)
|
self._playerClass.run(self, self._startupArgs.player_path, self._startupArgs.file, self._startupArgs._args)
|
||||||
self._playerClass = None
|
self._playerClass = None
|
||||||
self.protocolFactory = SyncClientFactory(self)
|
self.protocolFactory = SyncClientFactory(self)
|
||||||
reactor.connectTCP(host, port, self.protocolFactory)
|
reactor.connectTCP(host, port, self.protocolFactory)
|
||||||
self._running = True
|
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
|
||||||
def stop(self, promptForAction = False):
|
def stop(self, promptForAction = False):
|
||||||
|
Loading…
Reference in New Issue
Block a user