diff options
Diffstat (limited to 'playlist.py')
-rw-r--r-- | playlist.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/playlist.py b/playlist.py index d25395b..2880733 100644 --- a/playlist.py +++ b/playlist.py @@ -22,3 +22,17 @@ class Playlist: def clear(self): self.__init__(self._setSongCallback) + + def nextSong(self): + if self._currentSong is None: + nextSong = 0 + else: + nextSong = self._currentSong + 1 + self.setCurrentSong(nextSong) + + def previousSong(self): + if self._currentSong is None: + prevSong = 0 + else: + prevSong = self._currentSong - 1 + self.setCurrentSong(prevSong) |