[gnome-music] albumArtCache: Pass width/height during pixbuf loading
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] albumArtCache: Pass width/height during pixbuf loading
- Date: Sun, 3 Jan 2016 21:03:20 +0000 (UTC)
commit f2fe9d838bf7aa5556e075f60c7aa1a5994b709f
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 3 21:55:36 2016 +0100
albumArtCache: Pass width/height during pixbuf loading
We need it when signaling finish().
gnomemusic/albumArtCache.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 1d98602..0554d3b 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -231,21 +231,21 @@ class AlbumArtCache(GObject.GObject):
height = height or -1
stream = thumb_file.read_finish (result)
GdkPixbuf.Pixbuf.new_from_stream_at_scale_async(stream, width, height, True, None,
self.pixbuf_loaded,
- [item, thumb_file, callback, itr, artist, album])
+ [item, width, height, thumb_file, callback, itr,
artist, album])
except Exception as e:
logger.warn("Error: %s, %s", e.__class__, e)
self.finish(item, None, None, callback, itr, width, height)
@log
def pixbuf_loaded(self, stream, result, arguments):
- (item, thumb_file, callback, itr, artist, album) = arguments
+ (item, width, height, thumb_file, callback, itr, artist, album) = arguments
try:
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish (result)
- self.finish(item, _make_icon_frame(pixbuf), thumb_file.get_path(), callback, itr, artist, album)
+ self.finish(item, _make_icon_frame(pixbuf), thumb_file.get_path(), callback, itr, width, height,
artist, album)
except Exception as e:
logger.warn("Error: %s, %s", e.__class__, e)
- self.finish(item, None, None, callback, itr, None, None)
+ self.finish(item, None, None, callback, itr, width, height)
@log
def lookup_worker(self, item, width, height, callback, itr, artist, album):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]