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

Method autoplayCountdown

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

Source from the content-addressed store, hash-verified

1055 self.autoplayTimeLeft = constants.AUTOPLAY_DELAY
1056
1057 def autoplayCountdown(self):
1058 if not self.autoplayConditionsMet():
1059 self.stopAutoplayCountdown()
1060 return
1061 allReadyMessage = getMessage("all-users-ready").format(self.userlist.readyUserCount())
1062 autoplayingMessage = getMessage("autoplaying-notification").format(int(self.autoplayTimeLeft))
1063 countdownMessage = "{}{}{}".format(allReadyMessage, self._player.osdMessageSeparator, autoplayingMessage)
1064 self.ui.showOSDMessage(countdownMessage, 1, OSDType=constants.OSD_ALERT, mood=constants.MESSAGE_GOODNEWS)
1065 if self.autoplayTimeLeft <= 0:
1066 self.setPaused(False)
1067 self.stopAutoplayCountdown()
1068 else:
1069 self.autoplayTimeLeft -= 1
1070
1071 def resetAutoPlayState(self):
1072 self.autoPlay = False

Callers

nothing calls this directly

Calls 6

autoplayConditionsMetMethod · 0.95
stopAutoplayCountdownMethod · 0.95
setPausedMethod · 0.95
getMessageFunction · 0.90
readyUserCountMethod · 0.80
showOSDMessageMethod · 0.80

Tested by

no test coverage detected