sw: Use long press to append to playlist
This commit is contained in:
parent
1d9321501a
commit
8003bfa9d8
@ -294,7 +294,7 @@ class radioserv:
|
|||||||
self.disp_mgr.kill_display()
|
self.disp_mgr.kill_display()
|
||||||
|
|
||||||
elif (self.disp_mgr.current_display == self.disp_select):
|
elif (self.disp_mgr.current_display == self.disp_select):
|
||||||
if (key_press_short):
|
if (key_press_short) or (key_press_long):
|
||||||
sel = -1
|
sel = -1
|
||||||
|
|
||||||
if (key_id == 0): # Tune-
|
if (key_id == 0): # Tune-
|
||||||
@ -318,11 +318,13 @@ class radioserv:
|
|||||||
self.disp_mgr.kill_display()
|
self.disp_mgr.kill_display()
|
||||||
else:
|
else:
|
||||||
print("Load {} {}.".format(self.disp_select.mode, self.disp_select.get_entry(sel)))
|
print("Load {} {}.".format(self.disp_select.mode, self.disp_select.get_entry(sel)))
|
||||||
|
if key_press_short:
|
||||||
self.mpd.clear()
|
self.mpd.clear()
|
||||||
if (self.disp_select.mode == "playlist"):
|
if (self.disp_select.mode == "playlist"):
|
||||||
self.mpd.load(self.disp_select.get_entry(sel))
|
self.mpd.load(self.disp_select.get_entry(sel))
|
||||||
else:
|
else:
|
||||||
self.mpd.add(self.disp_select.get_entry(sel))
|
self.mpd.add(self.disp_select.get_entry(sel))
|
||||||
|
if key_press_short:
|
||||||
self.mpd.play(0)
|
self.mpd.play(0)
|
||||||
self.disp_mgr.kill_display()
|
self.disp_mgr.kill_display()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user