mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-28 08:50:26 +00:00
Don't execute setPosition/setPaused when no file is open
This commit is contained in:
parent
c8e76f8fa9
commit
a01a4d08a9
@ -356,14 +356,14 @@ class SyncplayClient(object):
|
||||
|
||||
def setPosition(self, position):
|
||||
position += self.getUserOffset()
|
||||
if(self._player):
|
||||
if(self._player and self.userlist.currentUser.file):
|
||||
if(position < 0):
|
||||
position = 0
|
||||
self._protocol.sendState(self.getPlayerPosition(), self.getPlayerPaused(), True, None, True)
|
||||
self._player.setPosition(position)
|
||||
|
||||
def setPaused(self, paused):
|
||||
if(self._player):
|
||||
if(self._player and self.userlist.currentUser.file):
|
||||
self._player.setPaused(paused)
|
||||
|
||||
def start(self, host, port):
|
||||
|
Loading…
Reference in New Issue
Block a user