(self, message, duration=constants.OSD_DURATION, OSDType=constants.OSD_NOTIFICATION, mood=constants.MESSAGE_NEUTRAL)
| 1732 | self.__ui.showUserList(currentUser, rooms) |
| 1733 | |
| 1734 | def showOSDMessage(self, message, duration=constants.OSD_DURATION, OSDType=constants.OSD_NOTIFICATION, mood=constants.MESSAGE_NEUTRAL): |
| 1735 | if(isNoOSDMessage(message)): |
| 1736 | return |
| 1737 | |
| 1738 | autoplayConditionsMet = self._client.autoplayConditionsMet() |
| 1739 | if OSDType == constants.OSD_ALERT and not constants.SHOW_OSD_WARNINGS and not self._client.autoplayTimerIsRunning(): |
| 1740 | return |
| 1741 | if not self._client._player: |
| 1742 | return |
| 1743 | if constants.SHOW_OSD and self._client and self._client._player: |
| 1744 | if not self._client._player.alertOSDSupported: |
| 1745 | if OSDType == constants.OSD_ALERT: |
| 1746 | self.lastAlertOSDMessage = message |
| 1747 | if autoplayConditionsMet: |
| 1748 | self.lastAlertOSDEndTime = time.time() + 1.0 |
| 1749 | else: |
| 1750 | self.lastAlertOSDEndTime = time.time() + constants.NO_ALERT_OSD_WARNING_DURATION |
| 1751 | if self.lastNotificationOSDEndTime and time.time() < self.lastNotificationOSDEndTime: |
| 1752 | message = "{}{}{}".format(message, self._client._player.osdMessageSeparator, self.lastNotificatinOSDMessage) |
| 1753 | else: |
| 1754 | self.lastNotificatinOSDMessage = message |
| 1755 | self.lastNotificationOSDEndTime = time.time() + constants.OSD_DURATION |
| 1756 | if self.lastAlertOSDEndTime and time.time() < self.lastAlertOSDEndTime: |
| 1757 | message = "{}{}{}".format(self.lastAlertOSDMessage, self._client._player.osdMessageSeparator, message) |
| 1758 | self._client._player.displayMessage(message, int(duration * 1000), OSDType, mood) |
| 1759 | |
| 1760 | def setControllerStatus(self, username, isController): |
| 1761 | self.__ui.setControllerStatus(username, isController) |
no test coverage detected