rhythmbox r6254 - in trunk: . plugins/artdisplay/artdisplay
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6254 - in trunk: . plugins/artdisplay/artdisplay
- Date: Fri, 27 Mar 2009 00:08:33 +0000 (UTC)
Author: jmatthew
Date: Fri Mar 27 00:08:33 2009
New Revision: 6254
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6254&view=rev
Log:
2009-03-27 Jonathan Matthew <jonathan d14n org>
patch by: Niels Vorgaard Christensen <vorgaard c math ku dk>
* plugins/artdisplay/artdisplay/__init__.py:
Answer cover art requests for any entry, not just the current playing
one. Fixes #529873.
Modified:
trunk/ChangeLog
trunk/plugins/artdisplay/artdisplay/__init__.py
Modified: trunk/plugins/artdisplay/artdisplay/__init__.py
==============================================================================
--- trunk/plugins/artdisplay/artdisplay/__init__.py (original)
+++ trunk/plugins/artdisplay/artdisplay/__init__.py Fri Mar 27 00:08:33 2009
@@ -384,10 +384,9 @@
def on_get_pixbuf_completed(self, entry, pixbuf, uri):
# Set the pixbuf for the entry returned from the art db
- if entry != self.current_entry:
- return
- self.current_pixbuf = pixbuf
- self.art_widget.set (entry, pixbuf, uri, False)
+ if entry == self.current_entry:
+ self.current_pixbuf = pixbuf
+ self.art_widget.set (entry, pixbuf, uri, False)
if pixbuf:
db = self.shell.get_property ("db")
# This might be from a playing-changed signal,
@@ -398,8 +397,15 @@
gobject.idle_add(idle_emit_art)
def cover_art_request (self, db, entry):
- if entry == self.current_entry:
- return self.current_pixbuf
+ a = [None]
+ def callback(entry, pixbuf, uri):
+ a[0] = pixbuf
+ self.on_get_pixbuf_completed(entry, pixbuf, uri)
+
+ self.art_db.get_pixbuf(db, entry, callback)
+
+ # If callback was called synchronously we can return a pixmap
+ return a[0]
def cover_art_notify (self, db, entry, field, metadata):
if entry != self.current_entry:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]