2011-04-20 19:34:55 -04:00
|
|
|
# Bryan Schumaker (4 / 20 / 2011)
|
|
|
|
|
|
|
|
import libsaria
|
2011-04-20 19:44:45 -04:00
|
|
|
import queue
|
2011-04-20 21:07:00 -04:00
|
|
|
from ocarina import body
|
2011-04-20 19:34:55 -04:00
|
|
|
from ocarina.body import footer
|
2011-04-30 12:37:31 -04:00
|
|
|
from libsaria import callbacks
|
2011-04-24 18:59:52 -04:00
|
|
|
import playlist
|
2011-04-24 19:08:09 -04:00
|
|
|
import library
|
2011-04-20 19:34:55 -04:00
|
|
|
|
|
|
|
invite = libsaria.event.invite
|
|
|
|
|
|
|
|
def on_play(*args):
|
|
|
|
footer.on_play()
|
2011-04-30 12:37:31 -04:00
|
|
|
callbacks.on_play = on_play
|
2011-04-20 19:34:55 -04:00
|
|
|
|
|
|
|
def on_pause(*args):
|
|
|
|
footer.on_pause()
|
|
|
|
invite("POSTPAUSE", on_pause)
|
2011-04-20 19:44:45 -04:00
|
|
|
|
|
|
|
def on_stop(*args):
|
|
|
|
footer.on_pause()
|
|
|
|
invite("POSTSTOP", on_stop)
|
|
|
|
|
2011-04-20 20:34:14 -04:00
|
|
|
def on_load(*args):
|
|
|
|
footer.on_load()
|
2011-04-20 19:44:45 -04:00
|
|
|
queue.refresh()
|
2011-04-20 21:07:00 -04:00
|
|
|
body.cur_page_goto()
|
2011-04-20 20:34:14 -04:00
|
|
|
invite("POSTLOAD", on_load)
|
2011-04-22 17:30:56 -04:00
|
|
|
|
|
|
|
def on_like(*args):
|
|
|
|
footer.on_like()
|
|
|
|
invite("POSTSETLIKE", on_like)
|
2011-04-23 09:27:54 -04:00
|
|
|
|
|
|
|
def on_getart(path, id):
|
|
|
|
cur_id = libsaria.sources.get_attrs("id")
|
|
|
|
if id != cur_id:
|
|
|
|
path = "images/ocarina.png"
|
|
|
|
footer.set_art(path)
|
|
|
|
invite("POSTGETART", on_getart)
|
2011-04-24 18:59:52 -04:00
|
|
|
|
|
|
|
def on_load_playlist(*args):
|
|
|
|
playlist.refresh()
|
|
|
|
invite("POSTLOADPLAYLIST", on_load_playlist)
|
2011-04-24 19:08:09 -04:00
|
|
|
|
|
|
|
def on_load_library(*args):
|
|
|
|
library.refresh()
|
|
|
|
invite("POSTNEWSOURCE", on_load_library)
|