libsaria: Rename queue and playlist list functions

I rename them from list() to list_ids() so that it doesn't clobbel the
list constructor.
This commit is contained in:
Bryan Schumaker 2011-05-15 10:52:16 -04:00
parent b4eb7c15c5
commit 6d5ca5d416
3 changed files with 5 additions and 6 deletions

View File

@ -76,9 +76,9 @@ def list_source(source, *attrs):
get_attrs = library.get_attrs
append = ret.append
if source == PLAYLIST:
list_func = playlist.list
list_func = playlist.list_ids
elif source == QUEUE:
list_func = queue.list
list_func = queue.list_ids
if list_func != None:
for id in list_func():
append(get_attrs(id, *attrs))

View File

@ -17,11 +17,10 @@ cur_index = None
add_ids = playlist.add_ids
rm_ids = playlist.rm_ids
reset = playlist.reset
to_list = list
playlist.load()
def list():
def list_ids():
for id in playlist.song_list:
yield id
@ -54,7 +53,7 @@ def get_next(cur_id):
if filtered == False:
index = next.rand_next(playlist.song_list)
else:
index = next.rand_next(to_list(visible))
index = next.rand_next(list(visible))
else:
index = next.seq_next(cur_id)
if index != None:

View File

@ -12,7 +12,7 @@ add_ids = queue.add_ids
rm_ids = queue.rm_ids
reset = queue.reset
def list():
def list_ids():
for id in queue.queue_list:
yield id