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



On Thu, 2007-18-01 at 18:54 +0100, Guillaume Desmottes wrote:
> On jeu, 2007-01-18 at 09:32 -0800, Adam Zimmerman wrote:
> > On Thu, 2007-18-01 at 14:14 +0100, Guillaume Desmottes wrote:
> > > In the cover plugin, I got the current entry and have to find its cover.
> > > A really easy method would be to return this url:
> > > http://www.jamendo.com/get/album/id/album/artworkurl/redirect/<albumID>/?artwork_size=200
> > > To do that I need to get the Jamendo album id of the track and so I'd
> > > like to store it in the DB.
> > > 
> > > Or maybe you'd see a easier way to get this id without store it in the
> > > DB?
> > 
> > You can try doing what the Magnatune plugin does for the SKU: store it
> > in a python dictionary indexed by URI. Then you can just look up:
> > 
> > sku = self.__sku_dict[self.__db.entry_get(track,
> > rhythmdb.PROP_LOCATION)]
> > 
> 
> I always do this kind of the stuff in the Jamendo plugin but here I'm in
> the cover plugin and so can't access to this dictionary.

Right, I forgot. You can also add data to an entry itself, IIRC. I think
if you have an entry, there's a dictionary called entry.data which you
can access from anywhere.

--
Adam Zimmerman <adam_zimmerman sfu ca>

CREATIVITY  - http://mirrors.creativecommons.org/movingimages/Building_on_the_Past.mpg
ALWAYS      - http://www.musiccreators.ca/
BUILDS      - http://www.ubuntu.com/
ON THE PAST - http://www.theopencd.org/
--

 The world is not octal despite DEC.



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