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
|
on_load = null_cb
|
||||||
def load_file(file):
|
def load_file(file):
|
||||||
on_load(file)
|
on_load(file)
|
||||||
libsaria.path.lastfm.get_artwork(file)
|
|
||||||
|
|
||||||
on_like = null_cb
|
on_like = null_cb
|
||||||
def like_song(like):
|
def like_song(like):
|
||||||
|
|
|
@ -57,10 +57,7 @@ def resize_art(*args):
|
||||||
sa_id = page.connect("size-allocate", resize_art)
|
sa_id = page.connect("size-allocate", resize_art)
|
||||||
|
|
||||||
def set_art(path):
|
def set_art(path):
|
||||||
height = page.get_allocation().height
|
ARTWORK.set_image(path, 64)
|
||||||
if height > 64:
|
|
||||||
height = 64
|
|
||||||
ARTWORK.set_image(path, height)
|
|
||||||
|
|
||||||
def on_like(like):
|
def on_like(like):
|
||||||
def _on_like1(like):
|
def _on_like1(like):
|
||||||
|
|
|
@ -46,10 +46,7 @@ def resize_art(*args):
|
||||||
sa_id = tiny.connect("size-allocate", resize_art)
|
sa_id = tiny.connect("size-allocate", resize_art)
|
||||||
|
|
||||||
def set_art(path):
|
def set_art(path):
|
||||||
height = tiny.get_allocation().height
|
ARTWORK.set_image(path, 24)
|
||||||
if height > 24:
|
|
||||||
height = 24
|
|
||||||
ARTWORK.set_image(path, height)
|
|
||||||
|
|
||||||
def update_pos(pos):
|
def update_pos(pos):
|
||||||
cur_pos.set_text(pos)
|
cur_pos.set_text(pos)
|
||||||
|
|
|
@ -22,6 +22,7 @@ def on_load(file):
|
||||||
footer.on_load()
|
footer.on_load()
|
||||||
queue.refresh()
|
queue.refresh()
|
||||||
body.cur_page_goto()
|
body.cur_page_goto()
|
||||||
|
libsaria.path.lastfm.get_artwork(file)
|
||||||
callbacks.on_load = on_load
|
callbacks.on_load = on_load
|
||||||
|
|
||||||
def on_like(like):
|
def on_like(like):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user