libsaria: Add a load_file() callback
This commit is contained in:
parent
4e66cca423
commit
6e6705736e
|
@ -16,7 +16,7 @@ def load_file(file):
|
||||||
lock_audio()
|
lock_audio()
|
||||||
pipeline.load_file("file", file)
|
pipeline.load_file("file", file)
|
||||||
unlock_audio()
|
unlock_audio()
|
||||||
#callback.song_changed()
|
callbacks.load_file(file)
|
||||||
|
|
||||||
def get_state():
|
def get_state():
|
||||||
lock_audio()
|
lock_audio()
|
||||||
|
|
|
@ -10,3 +10,7 @@ def play():
|
||||||
on_pause = null_cb
|
on_pause = null_cb
|
||||||
def pause():
|
def pause():
|
||||||
on_pause()
|
on_pause()
|
||||||
|
|
||||||
|
on_load = null_cb
|
||||||
|
def load_file(file):
|
||||||
|
on_load(file)
|
||||||
|
|
|
@ -105,4 +105,4 @@ def load(file):
|
||||||
file = expand(file)
|
file = expand(file)
|
||||||
if not exists(file):
|
if not exists(file):
|
||||||
return False
|
return False
|
||||||
return call("LOAD", audio.load_file, file)
|
audio.load_file(file)
|
||||||
|
|
|
@ -18,11 +18,11 @@ def on_pause(*args):
|
||||||
footer.on_pause()
|
footer.on_pause()
|
||||||
callbacks.on_pause = on_pause
|
callbacks.on_pause = on_pause
|
||||||
|
|
||||||
def on_load(*args):
|
def on_load(file):
|
||||||
footer.on_load()
|
footer.on_load()
|
||||||
queue.refresh()
|
queue.refresh()
|
||||||
body.cur_page_goto()
|
body.cur_page_goto()
|
||||||
invite("POSTLOAD", on_load)
|
callbacks.on_load = on_load
|
||||||
|
|
||||||
def on_like(*args):
|
def on_like(*args):
|
||||||
footer.on_like()
|
footer.on_like()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user