One thing I was thinking might solve a number of problems would be to
make sure every album has an ALBUMARTIST (forgetting for a moment the
issue of whether or not (and how) to map ID3v2's TPE2/Band tag to the
ALBUMARTIST role). When an explicit ALBUMARTIST isn't given in the
tags, then the ARTIST(s) become the ALBUMARTIST(s).
>From the code I've looked at, this is implicitly how things work, but
it's not how the data is structured, which leads to a lot of extra
database queries. It would probably also help during the scanning
phase to note whether or not the album has an explicit ALBUMARTIST.
For instance, there's a bit of code where, in order to pull up the
artist to be listed in the 'by' for an album, three queries are
normally done:
Code:
--------------------
Find contributors With ALBUMARTIST_Role For album
If Not Found And UseBandAsAlbumArtist Then
Find contributor With BAND_Role For album
EndIf
If Not Found Then
Find contributors With ARTIST_role For album
EndIf
--------------------
This becomes a single query in all cases when every album has at least
one ALBUMARTIST. On a web page displaying a list of albums, where
let's say you have 50 albums, instead of doing 150 queries, you do just
50. In fact, since you wouldn't need all the If/Then logic, it should
just be a join on the albums query.
For the counting problem, the albums would have as many artists in the
count as there are ALBUMARTISTS. Most albums would have only one, but
you could have two or more.
--
JJZolx
Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=42085
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta