If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

[SOLVED] Amarok collection scan

Hi everyone,

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.

Background:
I use gentoo and am currently using the stable amarok and mysql versions:

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.

Description:
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

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 .

LDFLAGS="-Wl,--as-needed"

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).

I was having a similar problem with Amarok-2.3.0-r1, I wasn't getting any files at all in my collection. Let me warn you, mysql-5.1 currently has no support for the embedded use flag in case you want to update that. It took me awhile to figure it out, but I eventually downgraded mysql to 5.0 and got things working again.

Description:
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.

That happens when Amarok notices that the files are not longer there. It does not remove them from the collection right away.
Nothing wrong with MySql until here.

Originally Posted by sdimhoff

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.)

Partly right.
Amarok versions up until 2.3 did get confused after scanning. After collection copy operations (ripping is one of them) the UI didn't display the tracks correctly.
Changing the tags doesn't fix this because it doesn't re-read the tracks from the database.
Restarting Amarok solves the problem usually.

You can try the new Amarok 2.4 beta. It should solve those issues.

Originally Posted by sdimhoff

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.

That sounds more and more like a messed up database.
And there should never be an empty album after all.
Please try Amarok 2.4 beta and/or make a bug report.
Also we have a nice channel on freenode where questions can be asked.