sw: Use long press to append to playlist

master
Markus Koch 2020-08-23 14:15:10 +02:00
parent 1d9321501a
commit 8003bfa9d8
1 changed files with 5 additions and 3 deletions

View File

@ -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):