Remove from playlist
I can now remove songs from the playlist.
This commit is contained in:
parent
cd91638f9c
commit
333cbaeb37
|
@ -25,6 +25,10 @@ def add_id(id):
|
|||
song_list.append(id)
|
||||
song_set.add(id)
|
||||
|
||||
def rm_id(id):
|
||||
song_list.remove(id)
|
||||
song_set.remove(id)
|
||||
|
||||
def reset():
|
||||
global song_list
|
||||
global song_set
|
||||
|
|
|
@ -18,6 +18,7 @@ def init():
|
|||
|
||||
def filler():
|
||||
plist_page.init(filter, is_visible, right_click, reset)
|
||||
menu.add_plist_menu_item("Remove from playlist", rm_selected_from_playlist)
|
||||
plist_page.fill(playlist.walk)
|
||||
|
||||
def filter(text):
|
||||
|
@ -38,3 +39,8 @@ def refresh(*args):
|
|||
|
||||
def right_click(button, time):
|
||||
menu.make_plist_menu(button, time)
|
||||
|
||||
def rm_selected_from_playlist(menu):
|
||||
plist_page.for_each_selected(playlist.rm_id)
|
||||
playlist.save()
|
||||
refresh()
|
||||
|
|
Loading…
Reference in New Issue