(self, settings)
| 572 | |
| 573 | @requireLogged |
| 574 | def handleSet(self, settings): |
| 575 | for set_ in settings.items(): |
| 576 | command = set_[0] |
| 577 | if command == "room": |
| 578 | roomName = set_[1]["name"] if "name" in set_[1] else None |
| 579 | self._factory.setWatcherRoom(self._watcher, roomName) |
| 580 | elif command == "file": |
| 581 | self._watcher.setFile(set_[1]) |
| 582 | elif command == "controllerAuth": |
| 583 | password = set_[1]["password"] if "password" in set_[1] else None |
| 584 | room = set_[1]["room"] if "room" in set_[1] else None |
| 585 | self._factory.authRoomController(self._watcher, password, room) |
| 586 | elif command == "ready": |
| 587 | manuallyInitiated = set_[1]['manuallyInitiated'] if "manuallyInitiated" in set_[1] else False |
| 588 | username = set_[1]['username'] if "username" in set_[1] else None |
| 589 | self._factory.setReady(self._watcher, set_[1]['isReady'], manuallyInitiated=manuallyInitiated, username=username) |
| 590 | elif command == "playlistChange": |
| 591 | self._factory.setPlaylist(self._watcher, set_[1]['files']) |
| 592 | elif command == "playlistIndex": |
| 593 | self._factory.setPlaylistIndex(self._watcher, set_[1]['index']) |
| 594 | elif command == "features": |
| 595 | # TODO: Check |
| 596 | self._watcher.setFeatures(set_[1]) |
| 597 | |
| 598 | def sendSet(self, setting): |
| 599 | self.sendMessage({"Set": setting}) |
nothing calls this directly
no test coverage detected