From bab02110b00064968faa97e6ab2c8c97ec972937 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 22 Jan 2019 10:29:37 -0600 Subject: [PATCH] Fixed error in Media player. Now it should not skip the first song if you are in the last track and pressed 'play next' --- changelog.md | 1 + src/controller/buffers.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 3d2d5ef..9d32e48 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ * Alt + Left/down arrows: Play previous and next song if playing an audios buffer. * Control + P: Play/pause. * control+Shift+P: Play all. +* Fixed an error in the audio player that was skipping the first track if you were in the last song and pressed "play next" in the menu bar or via the keystroke. ## Changes in version 0.18 (21.01.2019) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 8082581..88a2c6a 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -494,7 +494,7 @@ class audioBuffer(feedBuffer): def play_next(self, *args, **kwargs): selected = self.tab.list.get_selected() - if selected < 0 or selected == self.tab.list.get_count()-1: + if selected < 0: selected = 0 if self.tab.list.get_count() <= selected+1: newpos = 0