[SOLVED] Amarok collection scan
NOTE: While writing this forum post, I've discovered a fix. Since I put a reasonable amount of effort into this I figured I might as well post my line of thinking and the eventual solution. Hopefully it will help someone else out as well.
I use gentoo and am currently using the stable amarok and mysql versions:
media-sound/amarok-2.2.2-r1 USE="embedded opengl"
dev-db/mysql-5.0.90-r2 USE="berkdb community embedded perl ssl"
Recently, and unfortunately I'm not sure if this started after an upgrade or not, my amarok collection has been on the fritz. Initial googleing and forum searching did not reveal an answer.
It started with missing songs. Songs that should have been there were suddenly missing from the collection despite the fact that the files in fact exist. The ones that disappeared from the collection that were still in the playlist would not play and had a 0:00 length associated with them. The album would still be recognized as existing, but the songs themselves were not available.
After ripping a new CD, I noticed that the new songs were available, but the album for whatever reason did not. I tried to manually change all of the tags, but this did not seem to help. (The tags themselves would properly change in the editing gui, but in the collection they would still show up as being improperly sorted. This problem is usually one of a lag between what is displayed and what is recorded in the db, but even after quitting the program and restarting it still did not work.)
Standard attempts to fix:
1.) Complete rescan of collection - Resulted in an even more messed up collection. Now, out of many many songs, only a few even register. There are now dozens of empty albums, many of which are incorrectly associated with unknown or compilation artists.
2.) revdep-rebuild - Results in no missed dependencies, and no problems fixed.
3.) Rebuilding amarok - No help
4.) Rebuilding mysql - No dice
Additional digging and actual fix:
Download:Gentoo - Amarok Wiki
The web page listed above has some interesting information. A somewhat similar problem is described as manifesting itself as the collection scanner not adding files to the collection. It recommends adding some LDFLAG options. The recommended options are safe according to Safe LDFLAGS - Gentoo Linux Wiki .
Note: that is a lowercase L in the Wl.
After this change in make.conf, rebuild both mysql and amarok.
Despite the fact that it is listed as safe, I have seen elsewhere that you still need to be careful. There are instructions on how to do this on a per-package basis, but I just threw it in make.conf because I don't mind breaking something in lieu of an immediate solution (also, in this case I'll have a good place to start).