From a77d3146de5a31aa5478fb2fccf76417bb1e4542 Mon Sep 17 00:00:00 2001 From: Et0h Date: Sat, 23 Jan 2016 22:05:23 +0000 Subject: [PATCH] Privatise non-public undo functions --- syncplay/client.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index 4d75484..954f0ba 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -581,26 +581,26 @@ class SyncplayClient(object): self._previousPlaylistRoom = None def updateUndoPlaylistBuffer(self, currentPlaylist, newPlaylist, newRoom): - if self.playlistBufferIsFromOldRoom(newRoom): - self.movePlaylistBufferToNewRoom(newRoom) - elif self.playlistBufferNeedsUpdating(currentPlaylist, newPlaylist): + if self._playlistBufferIsFromOldRoom(newRoom): + self._movePlaylistBufferToNewRoom(newRoom) + elif self._playlistBufferNeedsUpdating(currentPlaylist, newPlaylist): self._previousPlaylist = currentPlaylist - def playlistBufferIsFromOldRoom(self, newRoom): - return self._previousPlaylistRoom <> newRoom - - def movePlaylistBufferToNewRoom(self, currentRoom): - self._previousPlaylist = None - self._previousPlaylistRoom = currentRoom - - def playlistBufferNeedsUpdating(self, currentPlaylist, newPlaylist): - return self._previousPlaylist <> currentPlaylist and currentPlaylist <> newPlaylist - def canUndoPlaylist(self, currentPlaylist): return self._previousPlaylist is not None and currentPlaylist <> self._previousPlaylist def getPreviousPlaylist(self): return self._previousPlaylist + + def _playlistBufferIsFromOldRoom(self, newRoom): + return self._previousPlaylistRoom <> newRoom + + def _movePlaylistBufferToNewRoom(self, currentRoom): + self._previousPlaylist = None + self._previousPlaylistRoom = currentRoom + + def _playlistBufferNeedsUpdating(self, currentPlaylist, newPlaylist): + return self._previousPlaylist <> currentPlaylist and currentPlaylist <> newPlaylist def __executePrivacySettings(self, filename, size): if self._config['filenamePrivacyMode'] == PRIVACY_SENDHASHED_MODE: