move Meta::Album::image to Meta::Track::image

Maximilian Kossick mkossick at gmx.de
Tue Jun 26 19:07:41 CEST 2007


On Tuesday 26 June 2007, Ian Monroe wrote:
> On 6/26/07, Maximilian Kossick <mkossick at gmx.de> wrote:
> > Does a method to retrieve the image (=album cover) make sense on the
> > Track object from an API-POV?
>
> Currently an album can have more then one album cover, since we do it
> entirely from Album/Artist. Given this fact, its impossible for it to
> be anywhere other then Meta::Track without some novel way to do it.
> Really the whole Album/Artist thing has served us pretty well. So from
> an API-POV it does make sense, since Amarok doesn't really have "Album
> covers" but actually they are track covers.

I know that there is some code to select an album image for a track (embedded 
image, downloaded image, image stored in the file's directory). Is that what 
you mean by more than one album cover for an album?

Yes, n Amarok 1.x the "album covers" are really track covers. That isn't 
surprising given that there was no such thing as an album in Amarok 1.x ... 
only MetaBundles and some magic to figure out which MetaBundles belong to the 
same album( i'm not talking about the DB schema)

We can continue to use a Album/artist to store the cover, but that should be 
an implementation detail. I think it's more "natural" to leave the image 
method where it is because, in the real world, albums have covers, tracks 
don't.

> > We know that our album handling is not optimal, so should we not try to
> > improve/fix it instead?
>
> Well that is the main reason why I sent the patch to the list. I can't
> really think of another way to do it.
As mentioned above, the way we store and load the album covers is an 
implementation detail of the particular collection. And the (current) 
implementation of one collection should not influence the api all collections 
have in common (if we can avoid it) imo.

Max

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20070626/c39417b7/attachment.pgp 


More information about the Amarok-devel mailing list