Bug 206783

Summary: Incomplete file scanning into collection
Product: [Applications] amarok Reporter: Chris <crfrary>
Component: Collections/LocalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: kint1, kleofas, mitchell, tseeker
Priority: NOR    
Version: 2.1.80   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: amarok collectionscanner output

Description Chris 2009-09-08 21:01:18 UTC
Version:           2.1.80 (using KDE 4.3.1)
OS:                Linux
Installed from:    Ubuntu Packages

Several Songs are missing from my collection.  The artist and album are their but the songs are not.  It is random songs also.  If the artist does not have any songs listed then it will not show up when using the filter but will show up in the collection (still no mp3's though)
Comment 1 Jeff Mitchell 2009-09-09 13:52:15 UTC
Are they the same songs every scan? Does it work if you do a full rescan (Settings -> Collection -> Rescan Collection)? Does quitting Amarok and then re-opening it help? Did this behavior start after doing something specific (for instance, retagging tracks or albums from within Amarok?)
Comment 2 Tomasz Rozynek 2009-09-09 14:25:38 UTC
Possibly I've got the same issue. The same tracks are missing from the collection every time. In my case it's nearly 50% of the collection. Doing a full rescan as Jeff Mitchell suggested doesn't help. Removing old configuration (~/.kde/share/apps/amarok) and making a new one from scratch doesn't help neither. My packages are from Debian Experimental, upgraded yesterday (version 2.1.80 built Sep 3 2009).
Comment 3 Chris 2009-09-09 15:20:05 UTC
Yes it is the same songs everytime.  I have also done the same as Tomasz Rozynek and it continues on.
Comment 4 Jeff Mitchell 2009-09-09 16:05:34 UTC
OK. I need to take a look at the file(s)...please make some available to me and either post a link on here or mail me a link (depending on your inclinations towards copyright issues).
Comment 5 Chris 2009-09-11 06:14:00 UTC
Workaround:

Well i just updated via apt-get and updated everything (in alpha karmic).  I removed amarok before the update and also remove the app settings (/.kde/share/apps/amarok/) and the files with amarok on them in (/.kde/share/config) then reinstalled amarok. I did not restart the computer yet but everything seems to work now.

Hopefully that helps for anyone else.
Comment 6 Emmanuel Benoit 2009-09-13 15:40:27 UTC
I may have a very similar problem, using both the 2.1.80 version and a version compiled from 2.2-GIT.

I added an album to the collection earlier using the "move to collection" feature, and only the last track of this album shows up on the collection browser. The files are where they should be, so that isn't the problem.

If I remove the file corresponding to the last track (let's say track10.mp3), the collection updates itself and now displays the next-to-last track (i.e. track09.mp3). If I remove this one, then the eight track shows up, etc. Putting the last files back in the collection's directory causes it to show up again, but the previous one disappears.

Rescanning the collection didn't have any effect either.
Comment 7 Tomasz Rozynek 2009-09-14 10:40:09 UTC
@Jeff Mitchell
Here you go, 2 tracks. The whole album is available for free at http://towary.art.pl .

http://www.dir.pl/~rozynekt/amarok_tracks_for_bug_206783.zip
Comment 8 Jeff Mitchell 2009-09-14 17:41:52 UTC
Tomasz,

Try two things, if you don't mind.

One is, try putting just these two tracks into a directory, and then configure Amarok to scan only that one directory. Do a full rescan, then close Amarok and restart it (the collection browser has data refreshing issues, unfortunately, so after changing collection folders and a scan things can look messed up until Amarok is restarted). See if the files appear -- they do for me.

If they don't appear, please go to that directory in a console, then run "amarokcollectionscanner ." and send the output.

Thanks!
Comment 9 kinto 2009-09-20 11:25:16 UTC
Created attachment 37079 [details]
amarok collectionscanner output
Comment 10 kinto 2009-09-20 11:33:08 UTC
It seems I have the same problem. With both amarok 2.1.85 and amarok-nightly from kubuntu.
I tried the full rescan + restart and nothing changed.
Then a tried to copy in another location the folder of an album of which only one track out of 24 was showing up in the collection.
I left in the new folder only 4 tracks, included track 15 that was the one showing up in the collection.
I changed the collection folder to be only the new copied folder and restarted.
In the collection appeared 2 tracks out of 4. Track 3 and Track 15. 
I ran collection scanner in the new folder and attached the output here.
The songs used are here: 
http://rapidshare.com/files/282530977/amarok_tracks_for_bug_206783.zip.html
Comment 11 Jeff Mitchell 2009-09-20 19:58:50 UTC
Meh. As it often does, it comes down to bad tags.

The problem is that three of your four tracks in the zip file have MusicBrainz identifiers, which we use if they exist for Amarok File Tracking. Unfortunately, the content of these identifiers is totally empty; as a result they all end up with the same identifier, which confuses Amarok (unsurprisingly since unique identifiers should be, well, unique).

I'll add a check to see if tags are empty and not rely on them if so. Look for another post here for when it's done; at that point please update and test.
Comment 12 Jeff Mitchell 2009-09-20 20:07:40 UTC
Fixed in 7d46f5f.
Comment 13 kinto 2009-09-21 16:03:10 UTC
I'm not compiling amarok myself so I have to wait for amarok-nightly to catch up.
Right now the build is failing...
I'll test it as soon as possible.
About the tags, I know for sure I ripped myself that disc with abcde or grip...Do you have any clues of what could have messed up the tags? Furthermore, I have the same problem for a lot of my music collection but I didn't notice it with previous version of amarok 2, so I checked on another pc where I ran kubuntu Jaunty with amarok 2.1.1 and the problem didn't happen. The same 4 tracks showed up in the collection there.
Comment 14 kinto 2009-09-27 12:03:30 UTC
Hi, finally amarok-nightly did build! I tested it and now all the songs seem to appear in the collection! Thank you very much for fixing this even for poorly tagged songs.
I will try to improve my tags :-)