MCPcopy Create free account
hub / github.com/Syncplay/syncplay / instaplayConditionsMet

Method instaplayConditionsMet

syncplay/client.py:1016–1031  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1014 self.stopAutoplayCountdown()
1015
1016 def instaplayConditionsMet(self):
1017 if self.isPlayingMusic():
1018 return True
1019 if not self.userlist.currentUser.canControl():
1020 return False
1021
1022 unpauseAction = self._config['unpauseAction']
1023 if self.userlist.currentUser.isReady() or unpauseAction == constants.UNPAUSE_ALWAYS_MODE:
1024 return True
1025 elif unpauseAction == constants.UNPAUSE_IFOTHERSREADY_MODE and self.userlist.areAllOtherUsersInRoomReady():
1026 return True
1027 elif unpauseAction == constants.UNPAUSE_IFMINUSERSREADY_MODE and self.userlist.areAllOtherUsersInRoomReady()\
1028 and self.autoPlayThreshold and self.userlist.usersInRoomCount() >= self.autoPlayThreshold:
1029 return True
1030 else:
1031 return False
1032
1033 def autoplayConditionsMet(self):
1034 if self.seamlessMusicOveride():

Callers 1

_toggleReadyMethod · 0.95

Calls 5

isPlayingMusicMethod · 0.95
usersInRoomCountMethod · 0.80
canControlMethod · 0.45
isReadyMethod · 0.45

Tested by

no test coverage detected