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:
parent
d0198cdd1a
commit
a6bd531aee
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user