ocarina: Single add_to_queue() function

This function is similar to the add_to_playlist() function I recently
added.  The idea is to have the queue add things to itself, rather than
having the playlist and library implement this function independently.
This commit is contained in:
Bryan Schumaker 2011-02-05 12:55:44 -05:00
parent f8ed280ba1
commit 6d08dedba5
3 changed files with 6 additions and 4 deletions

View File

@ -52,5 +52,4 @@ def add_selected_to_playlist(menu):
def add_selected_to_queue(menu):
import queue
lib_page.for_each_selected_id(sources.queue.add_id)
queue.refresh()
queue.add_to_queue(lib_page)

View File

@ -55,5 +55,4 @@ def add_to_playlist(source_page):
def add_selected_to_queue(menu):
import queue
plist_page.for_each_selected_id(sources.queue.add_id)
queue.refresh()
queue.add_to_queue(plist_page)

View File

@ -45,6 +45,10 @@ def rm_selected_from_queue(menu):
queue_page.for_each_selected_id(queue.rm_id)
refresh()
def add_to_queue(source_page):
source_page.for_each_selected_id(queue.add_id)
refresh()
def play_id(id):
queue.play_id(id)
refresh()