(self, client)
| 489 | self.relistRoomList(roomList) |
| 490 | |
| 491 | def addClient(self, client): |
| 492 | self._syncplayClient = client |
| 493 | if self.console: |
| 494 | self.console.addClient(client) |
| 495 | self.config = self._syncplayClient.getConfig() |
| 496 | self.roomsCombobox.setEditText(self._syncplayClient.getRoom()) |
| 497 | self.fillRoomsCombobox() |
| 498 | try: |
| 499 | self.playlistGroup.blockSignals(True) |
| 500 | self.playlistGroup.setChecked(self.config['sharedPlaylistEnabled']) |
| 501 | self.playlistGroup.blockSignals(False) |
| 502 | self._syncplayClient.fileSwitch.setMediaDirectories(self.config["mediaSearchDirectories"]) |
| 503 | if not self.config["mediaSearchDirectories"]: |
| 504 | self._syncplayClient.ui.showErrorMessage(getMessage("no-media-directories-error")) |
| 505 | self.updateReadyState(self.config['readyAtStart']) |
| 506 | autoplayInitialState = self.config['autoplayInitialState'] |
| 507 | if autoplayInitialState is not None: |
| 508 | self.autoplayPushButton.blockSignals(True) |
| 509 | self.autoplayPushButton.setChecked(autoplayInitialState) |
| 510 | self.autoplayPushButton.blockSignals(False) |
| 511 | if self.config['autoplayMinUsers'] > 1: |
| 512 | self.autoplayThresholdSpinbox.blockSignals(True) |
| 513 | self.autoplayThresholdSpinbox.setValue(self.config['autoplayMinUsers']) |
| 514 | self.autoplayThresholdSpinbox.blockSignals(False) |
| 515 | self.changeAutoplayState() |
| 516 | self.changeAutoplayThreshold() |
| 517 | self.updateAutoPlayIcon() |
| 518 | except: |
| 519 | self.showErrorMessage("Failed to load some settings.") |
| 520 | self.automaticUpdateCheck() |
| 521 | |
| 522 | def promptFor(self, prompt=">", message=""): |
| 523 | # TODO: Prompt user |
no test coverage detected