From 328d9ae201cabe8e4189736cd806ecea7b675200 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 1 Jan 2022 15:49:06 +0100 Subject: Added previous/next song buttons to MIDI interface, updated known issues --- playlist.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'playlist.py') 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) -- cgit v1.2.3