Allow managed room password to be specified in name (after : separator) (#216)
This commit is contained in:
parent
51cc57ce03
commit
143df6c999
@ -1,5 +1,5 @@
|
|||||||
version = '1.6.5'
|
version = '1.6.5'
|
||||||
revision = ' development'
|
revision = ' development'
|
||||||
milestone = 'Yoitsu'
|
milestone = 'Yoitsu'
|
||||||
release_number = '82'
|
release_number = '83'
|
||||||
projectURL = 'https://syncplay.pl/'
|
projectURL = 'https://syncplay.pl/'
|
||||||
|
|||||||
@ -645,6 +645,12 @@ class SyncplayClient(object):
|
|||||||
return features
|
return features
|
||||||
|
|
||||||
def setRoom(self, roomName, resetAutoplay=False):
|
def setRoom(self, roomName, resetAutoplay=False):
|
||||||
|
roomSplit = roomName.split(":")
|
||||||
|
if roomName.startswith("+") and len(roomSplit) > 2:
|
||||||
|
roomName = roomSplit[0] + ":" + roomSplit[1]
|
||||||
|
password = roomSplit[2]
|
||||||
|
self.storeControlPassword(roomName, password)
|
||||||
|
self.ui.updateRoomName(roomName)
|
||||||
self.userlist.currentUser.room = roomName
|
self.userlist.currentUser.room = roomName
|
||||||
if resetAutoplay:
|
if resetAutoplay:
|
||||||
self.resetAutoPlayState()
|
self.resetAutoPlayState()
|
||||||
@ -657,6 +663,7 @@ class SyncplayClient(object):
|
|||||||
self.reIdentifyAsController()
|
self.reIdentifyAsController()
|
||||||
|
|
||||||
def reIdentifyAsController(self):
|
def reIdentifyAsController(self):
|
||||||
|
self.setRoom(self.userlist.currentUser.room)
|
||||||
room = self.userlist.currentUser.room
|
room = self.userlist.currentUser.room
|
||||||
if utils.RoomPasswordProvider.isControlledRoom(room):
|
if utils.RoomPasswordProvider.isControlledRoom(room):
|
||||||
storedRoomPassword = self.getControlledRoomPassword(room)
|
storedRoomPassword = self.getControlledRoomPassword(room)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user