libsaria: Add a load_file() callback

This commit is contained in:
Bryan Schumaker 2011-04-30 12:55:48 -04:00
parent 4e66cca423
commit 6e6705736e
4 changed files with 8 additions and 4 deletions

View File

@ -16,7 +16,7 @@ def load_file(file):
lock_audio()
pipeline.load_file("file", file)
unlock_audio()
#callback.song_changed()
callbacks.load_file(file)
def get_state():
lock_audio()

View File

@ -10,3 +10,7 @@ def play():
on_pause = null_cb
def pause():
on_pause()
on_load = null_cb
def load_file(file):
on_load(file)

View File

@ -105,4 +105,4 @@ def load(file):
file = expand(file)
if not exists(file):
return False
return call("LOAD", audio.load_file, file)
audio.load_file(file)

View File

@ -18,11 +18,11 @@ def on_pause(*args):
footer.on_pause()
callbacks.on_pause = on_pause
def on_load(*args):
def on_load(file):
footer.on_load()
queue.refresh()
body.cur_page_goto()
invite("POSTLOAD", on_load)
callbacks.on_load = on_load
def on_like(*args):
footer.on_like()