Update client.py

This commit is contained in:
Etoh 2023-06-03 17:55:02 +01:00 committed by GitHub
parent c46529bb8a
commit 4c516129e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1956,6 +1956,11 @@ class SyncplayPlaylist():
playlistFile.write(playlistToSave) playlistFile.write(playlistToSave)
self._ui.showMessage("Playlist saved as {}".format(path)) # TODO: Move to messages_en self._ui.showMessage("Playlist saved as {}".format(path)) # TODO: Move to messages_en
def playlistNeedsRestoring(self, files, username):
if self._client.playlistMayNeedRestoring:
self._client.playlistMayNeedRestoring = False
return self._client.sharedPlaylistIsEnabled() and self._playlist != None and files == [] and username == None and not self._playlistBufferIsFromOldRoom(self._client.userlist.currentUser.room)
def changePlaylist(self, files, username=None, resetIndex=False): def changePlaylist(self, files, username=None, resetIndex=False):
if self.playlistNeedsRestoring(files, username): if self.playlistNeedsRestoring(files, username):
self._ui.showDebugMessage("Restoring playlist on reconnect...") self._ui.showDebugMessage("Restoring playlist on reconnect...")