diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-01-01 15:49:06 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-01-01 15:49:06 +0100 |
commit | 328d9ae201cabe8e4189736cd806ecea7b675200 (patch) | |
tree | 97f198c5f4b3f3ceff0b39690f703b73d2f69de1 /playlist.py | |
parent | 71f6a49110b6696ca6ac7956baa4edaa1aaa9527 (diff) |
Added previous/next song buttons to MIDI interface, updated known issues
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) |