(self, username, room, file_, oldRoom=None)
| 1393 | return False |
| 1394 | |
| 1395 | def __showUserChangeMessage(self, username, room, file_, oldRoom=None): |
| 1396 | if room: |
| 1397 | if self.isRoomSame(room) or self.isRoomSame(oldRoom): |
| 1398 | showOnOSD = constants.SHOW_OSD_WARNINGS |
| 1399 | else: |
| 1400 | showOnOSD = constants.SHOW_DIFFERENT_ROOM_OSD |
| 1401 | if constants.SHOW_NONCONTROLLER_OSD == False and self.canControl(username) == False: |
| 1402 | showOnOSD = False |
| 1403 | hideFromOSD = not showOnOSD |
| 1404 | if not file_: |
| 1405 | message = getMessage("room-join-notification").format(username, room) |
| 1406 | self.ui.showMessage(message, hideFromOSD) |
| 1407 | else: |
| 1408 | duration = utils.formatTime(file_['duration']) |
| 1409 | message = getMessage("playing-notification").format(username, file_['name'], duration) |
| 1410 | if self.currentUser.room != room or self.currentUser.username == username: |
| 1411 | message += getMessage("playing-notification/room-addendum").format(room) |
| 1412 | self.ui.showMessage(message, hideFromOSD) |
| 1413 | if self.currentUser.file and not self.currentUser.isFileSame(file_) and self.currentUser.room == room: |
| 1414 | fileDifferences = self.getFileDifferencesForUser(self.currentUser.file, file_) |
| 1415 | if fileDifferences is not None: |
| 1416 | message = getMessage("file-differences-notification").format(fileDifferences) |
| 1417 | self.ui.showMessage(message, True) |
| 1418 | |
| 1419 | def getFileDifferencesForUser(self, currentUserFile, otherUserFile): |
| 1420 | if not currentUserFile or not otherUserFile: |
no test coverage detected