From f81d302c9a7b241ac928212ce8d6cc6a460a889d Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 6 May 2019 12:09:53 -0500 Subject: [PATCH] Updated player --- src/controller/buffers.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index a0b2af8..70fb398 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -625,13 +625,17 @@ class audioBuffer(feedBuffer): self.tab.post.Enable(True) def get_event(self, ev): - if ev.GetKeyCode() == wx.WXK_RETURN: event = "play_audio" + if ev.GetKeyCode() == wx.WXK_RETURN: + if len(self.tab.list.get_multiple_selection()) < 2: + event = "play_all" + else: + event = "play_audio" else: event = None ev.Skip() if event != None: try: - getattr(self, event)() + getattr(self, event)(skip_pause=True) except AttributeError: pass @@ -642,7 +646,7 @@ class audioBuffer(feedBuffer): super(audioBuffer, self).connect_events() def play_audio(self, *args, **kwargs): - if player.player.check_is_playing(): + if player.player.check_is_playing() and not "skip_pause" in kwargs: return pub.sendMessage("pause") selected = self.tab.list.get_multiple_selection() if len(selected) == 0: