MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _deleteRoomIfEmpty

Method _deleteRoomIfEmpty

syncplay/server.py:498–506  ·  view source on GitHub ↗
(self, room)

Source from the content-addressed store, hash-verified

496 return room
497
498 def _deleteRoomIfEmpty(self, room):
499 if room.isEmpty() and room.getName():
500 if self._roomsDbHandle and room.isPermanent():
501 return
502 if self._roomsDbHandle and room.isNotPermanent():
503 if room.isPersistent() and not room.isPlaylistEmpty():
504 return
505 self._roomsDbHandle.deleteRoom(room.getName())
506 del self._rooms[room.getName()]
507
508 def findFreeUsername(self, username, maxUsernameLength=constants.MAX_USERNAME_LENGTH):
509 username = truncateText(username, maxUsernameLength)

Callers 2

removeWatcherMethod · 0.95
_getRoomMethod · 0.95

Calls 7

isEmptyMethod · 0.80
isPermanentMethod · 0.80
isNotPermanentMethod · 0.80
isPersistentMethod · 0.80
isPlaylistEmptyMethod · 0.80
deleteRoomMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected