Re: [Rhythmbox-devel] Add a field in the DB / Jamendo cover art



On Sun, 2007-01-21 at 17:24 +0100, Guillaume Desmottes wrote:
> On ven, 2007-01-19 at 00:26 +0000, Edward Catmur wrote:
> > You don't have to write an ArtDisplayPlugin source; once bug 398093[1]
> > is fixed you will be able to emit the art on the metadatabus from the
> > Jamendo plugin and the art widget will display it.
> > 
> > Hm - looks like you'd be better off emitting an uri on the metadatabus.
> > I'll look into getting that to work.
> > 
> 
> As bug 398231 was fixed, I have to use it now (if a well understand).
> Could you tell me some words about how to use it or a little sample code
> to emit my URL to the plugin please?
> 

db = self.shell.get_property ("db")
db.emit_entry_extra_metadata_notify (entry, "rb:coverArt-uri",
"http://www.jamendo.com/get/album/id/album/artworkurl/redirect/<albumID>/?artwork_size=200")

The artdisplay plugin, if enabled, is listening for signals on db of
'entry-extra-metadata-notify::rb:coverArt-uri' and will download the
uri, convert it to a GdkPixbuf, display it in the art widget, and emit
it in a "rb:coverArt" signal so that the tray icon can pick it up and
set it as the tooltip icon or notification icon (if currently
displayed).

If you already have a GdkPixbuf, you use

db.emit_entry_extra_metadata_notify (entry, "rb:coverArt", my_pixbuf)

Uris are preferred, though, because they carry more information.

Tell me if you have trouble getting it to work,

Ed



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]