From 8003bfa9d8179ef8a15fa5676e3a5e8eabc1e39b Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 23 Aug 2020 14:15:10 +0200 Subject: [PATCH] sw: Use long press to append to playlist --- software/webradio.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/software/webradio.py b/software/webradio.py index d186d4a..fa43917 100755 --- a/software/webradio.py +++ b/software/webradio.py @@ -294,7 +294,7 @@ class radioserv: self.disp_mgr.kill_display() elif (self.disp_mgr.current_display == self.disp_select): - if (key_press_short): + if (key_press_short) or (key_press_long): sel = -1 if (key_id == 0): # Tune- @@ -318,12 +318,14 @@ class radioserv: self.disp_mgr.kill_display() else: print("Load {} {}.".format(self.disp_select.mode, self.disp_select.get_entry(sel))) - self.mpd.clear() + if key_press_short: + self.mpd.clear() if (self.disp_select.mode == "playlist"): self.mpd.load(self.disp_select.get_entry(sel)) else: self.mpd.add(self.disp_select.get_entry(sel)) - self.mpd.play(0) + if key_press_short: + self.mpd.play(0) self.disp_mgr.kill_display() if (rotary_delta != 0):