libsaria: Rename playlist's next() function
This is to prepare for creating a new file "next.py" dedicated to choosing the next song. I also use this as an opportunity to pass the current song id to the next function.
This commit is contained in:
parent
a950f06e10
commit
0a1160f618
|
@ -65,7 +65,7 @@ def next():
|
|||
global cur_id
|
||||
cur_id = queue.next()
|
||||
if cur_id == None:
|
||||
cur_id = playlist.next()
|
||||
cur_id = playlist.get_next(cur_id)
|
||||
return library.get_attrs(cur_id, "filepath")
|
||||
|
||||
def list_source(source, *attrs):
|
||||
|
|
|
@ -106,7 +106,7 @@ def play_id(id):
|
|||
return True
|
||||
return False
|
||||
|
||||
def next():
|
||||
def get_next(cur_id):
|
||||
id = None
|
||||
if len(playlist.song_list) == 0:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue