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

Method setPlaylist

syncplay/ui/gui.py:1997–2013  ·  view source on GitHub ↗
(self, newPlaylist, newIndexFilename=None)

Source from the content-addressed store, hash-verified

1995 self._syncplayClient.setPosition(0)
1996
1997 def setPlaylist(self, newPlaylist, newIndexFilename=None):
1998 if self.updatingPlaylist:
1999 self.ui.showDebugMessage("Trying to set playlist while it is already being updated")
2000 if newPlaylist == self.playlistState:
2001 if newIndexFilename:
2002 self.playlist.setPlaylistIndexFilename(newIndexFilename)
2003 self.updatingPlaylist = False
2004 return
2005 self.updatingPlaylist = True
2006 if newPlaylist and len(newPlaylist) > 0:
2007 self.clearedPlaylistNote = True
2008 self.playlistState = newPlaylist
2009 self.playlist.updatePlaylist(newPlaylist)
2010 if newIndexFilename:
2011 self.playlist.setPlaylistIndexFilename(newIndexFilename)
2012 self.updatingPlaylist = False
2013 self._syncplayClient.fileSwitch.updateInfo()
2014
2015 def setPlaylistIndexFilename(self, filename):
2016 self.playlist.setPlaylistIndexFilename(filename)

Callers 1

Calls 4

updatePlaylistMethod · 0.80
updateInfoMethod · 0.80
showDebugMessageMethod · 0.45

Tested by

no test coverage detected