View Full Version : Empty Albums

2006-11-02, 11:13
6.5.1 Nightlies

I have cue file'd mp3s in my collection...

After a scan this creates empty albums (no tracks) that show up in the album list (from the source mp3's id3 info)
It also creates contributors without any parent tracks or albums, but these "empty artists" (orphans?) don't show up in searches or browsing.

to see these empty albums:
I run a script after scanning that does
SELECT `albums`.`id`
FROM `albums`
LEFT JOIN `tracks` ON `tracks`.`album` = `albums`.`id`
WHERE `tracks`.`album` IS NULL
to get these empty albums. I then remove them from the albums table.

And to see the empty artists
SELECT `contributors`.*
FROM `contributors`
LEFT JOIN `contributor_track` ON `contributor_track`.`contributor` = `contributors`.`id`
LEFT JOIN `contributor_album` ON `contributor_album`.`contributor` = `contributors`.`id`
WHERE `contributor_track`.`contributor` IS NULL AND `contributor_album`.`contributor` IS NULL

2006-11-02, 11:21
I said the empty artists don't show up. I take that back.
They show up.. and link to the empty albums...
Once i remove the empty albums from the db these associated artists (while still in the db) don't show up.