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

Method setPlaylist

syncplay/server.py:234–241  ·  view source on GitHub ↗
(self, watcher, files)

Source from the content-addressed store, hash-verified

232 self._roomManager.broadcastRoom(watcher, lambda w: w.sendSetReady(watcher.getName(), watcher.isReady(), manuallyInitiated))
233
234 def setPlaylist(self, watcher, files):
235 room = watcher.getRoom()
236 if room.canControl(watcher) and playlistIsValid(files):
237 watcher.getRoom().setPlaylist(files, watcher)
238 self._roomManager.broadcastRoom(watcher, lambda w: w.setPlaylist(watcher.getName(), files))
239 else:
240 watcher.setPlaylist(room.getName(), room.getPlaylist())
241 watcher.setPlaylistIndex(room.getName(), room.getPlaylistIndex())
242
243 def setPlaylistIndex(self, watcher, index):
244 room = watcher.getRoom()

Callers

nothing calls this directly

Calls 9

playlistIsValidFunction · 0.90
broadcastRoomMethod · 0.80
getPlaylistMethod · 0.80
getPlaylistIndexMethod · 0.80
getRoomMethod · 0.45
canControlMethod · 0.45
setPlaylistMethod · 0.45
getNameMethod · 0.45
setPlaylistIndexMethod · 0.45

Tested by

no test coverage detected