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

Ian Monroe ian at monroe.nu
Wed Jun 27 05:22:00 CEST 2007


On 6/26/07, Maximilian Kossick <mkossick at gmx.de> wrote:
> > > 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


The fact that we currently implement it as a Artist/Album is I think
not merely a implementation detail, but a design decision. Images were
associated with Artist/Album not simply as the way to kept track of
covers out of a necessity from the "string-based" way we were doing
things, but because there is no clean solution to uniquely identifying
Albums and keeping 20 different "Greatest Hits" albums apart.

Its impossible to use this design with Meta::Album's having the image,
unless you create a new Meta::Album for each Album/Artist combination.
 Or pass the artist name to Meta::Album::image method, since
(disregarding the rarely used "Album Artist") the Album has no
::artist().

To keep the Meta::Album::image in its current location does require a
new implementation and design for covers. Which is worth thinking
about. Perhaps some keen way to keep different albums of the same name
apart and then use a new database design to keep track of it all. We
already have similar sorts of smarts for finding compilation albums
(guessing based on what directory the files are in and such). But I'm
not sure its possible to do it reliably.

Ian


More information about the Amarok-devel mailing list