ocarina: Fetch image during load

I also set absolute sizes for album art.  Scaling to size 1 was causing
scale_simple() to block forever.
This commit is contained in:
Bryan Schumaker 2011-04-30 13:52:34 -04:00
parent d0198cdd1a
commit a6bd531aee
4 changed files with 3 additions and 9 deletions

View File

@ -16,7 +16,6 @@ def pause():
on_load = null_cb
def load_file(file):
on_load(file)
libsaria.path.lastfm.get_artwork(file)
on_like = null_cb
def like_song(like):

View File

@ -57,10 +57,7 @@ def resize_art(*args):
sa_id = page.connect("size-allocate", resize_art)
def set_art(path):
height = page.get_allocation().height
if height > 64:
height = 64
ARTWORK.set_image(path, height)
ARTWORK.set_image(path, 64)
def on_like(like):
def _on_like1(like):

View File

@ -46,10 +46,7 @@ def resize_art(*args):
sa_id = tiny.connect("size-allocate", resize_art)
def set_art(path):
height = tiny.get_allocation().height
if height > 24:
height = 24
ARTWORK.set_image(path, height)
ARTWORK.set_image(path, 24)
def update_pos(pos):
cur_pos.set_text(pos)

View File

@ -22,6 +22,7 @@ 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):