ac0f23ab80
The new library covers everything, so this is no longer needed.
48 lines
969 B
Python
48 lines
969 B
Python
# Bryan Schumaker (4 / 20 / 2011)
|
|
|
|
import libsaria
|
|
import queue
|
|
from ocarina import body
|
|
from ocarina.body import footer
|
|
from libsaria import callbacks
|
|
import playlist
|
|
import library
|
|
|
|
def on_play():
|
|
footer.on_play()
|
|
callbacks.on_play = on_play
|
|
|
|
def on_pause():
|
|
footer.on_pause()
|
|
callbacks.on_pause = on_pause
|
|
|
|
def on_load(file):
|
|
footer.on_load()
|
|
queue.refresh()
|
|
body.cur_page_goto()
|
|
libsaria.path.lastfm.get_artwork(file)
|
|
callbacks.on_load = on_load
|
|
|
|
def on_like(like):
|
|
footer.on_like(like)
|
|
callbacks.on_like = on_like
|
|
|
|
def on_get_art(path, id):
|
|
cur_id = libsaria.sources.get_attrs("id")
|
|
if id != cur_id:
|
|
path = "images/ocarina.png"
|
|
footer.set_art(path)
|
|
callbacks.on_get_art = on_get_art
|
|
|
|
def on_load_playlist():
|
|
playlist.refresh()
|
|
callbacks.on_load_playlist = on_load_playlist
|
|
|
|
def library_updated():
|
|
library.refresh()
|
|
callbacks.on_library_updated = library_updated
|
|
|
|
def on_queue_changed():
|
|
queue.refresh()
|
|
callbacks.on_queue_changed = on_queue_changed
|