ocarina/libsaria/callbacks.py
Bryan Schumaker 645b70b33c libsaria: Introduce libsaria.sources.all_attrs()
This patch introduces a new function "all_attrs()" which will return a
dictionary containing all the attributes for the current song.  To help
the gui, I pass this dictionary during an on_load() callback.
2011-06-17 19:47:04 -04:00

48 lines
722 B
Python

# Bryan Schumaker (4 / 30 / 2011)
import libsaria
def null_cb(*args):
pass
on_play = null_cb
def play():
on_play()
on_pause = null_cb
def pause():
on_pause()
on_load = null_cb
def load_file(file):
attrs = libsaria.sources.all_attrs()
on_load(file, attrs)
on_like = null_cb
def like_song(like):
on_like(like)
on_set_volume = null_cb
def set_volume(prcnt):
on_set_volume(prcnt)
on_get_art = null_cb
def get_art(file, id):
on_get_art(file, id)
on_load_playlist = null_cb
def load_playlist():
on_load_playlist()
on_library_updated = null_cb
def library_updated():
on_library_updated()
on_queue_changed = null_cb
def queue_changed():
on_queue_changed()
on_filter = null_cb
def refilter():
on_refilter()