Bug 275422 - Amarok doesn't add all tracks to the collection
Summary: Amarok doesn't add all tracks to the collection
Status: RESOLVED DUPLICATE of bug 258555
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.4.1
Platform: Archlinux Linux
: NOR normal
Target Milestone: 2.4.2
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-11 20:08 UTC by giggi1999
Modified: 2011-11-17 15:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description giggi1999 2011-06-11 20:08:24 UTC
Version:           2.4.1 (using KDE 4.6.3) 
OS:                Linux

I'm using mysql.

In my collection I've about 15'000 teaks.
But after a full rescan I see only 8000 tracks.

The scanning terminate with this error message.

------------------------------------------------

That's a little portion on the error log:
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/111-peter_gabriel-more_than_this_(radio_edit)-xxl.mp3 with uid amarok-sqltrackuid://44a36009cfd66302947822377b6a389d already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/110-peter_gabriel-blood_of_eden_(radio_edit)-xxl.mp3 with uid amarok-sqltrackuid://e4ae68b9a3433dcc670636f89051ec95 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/109-peter_gabriel-digging_in_the_dirt-xxl.mp3 with uid amarok-sqltrackuid://b79f83e2891ac7cb0163cf082d8872b2 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/108-peter_gabriel-growning_up_(tom_lord-alge_mix)-xxl.mp3 with uid amarok-sqltrackuid://a647f0191191121157cbefff1f235435 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/107-peter_gabriel-burn_you_up_burn_you_down-xxl.mp3 with uid amarok-sqltrackuid://ce625cd5826d4026e58de0a7ee40f79f already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/106-peter_gabriel-big_time-xxl.mp3 with uid amarok-sqltrackuid://31070402b54a7fa431c192483f1dee08 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/105-peter_gabriel-games_without_frontiers-xxl.mp3 with uid amarok-sqltrackuid://8b7313dfb00dcaa71c95915ff1d46c63 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/104-peter_gabriel-dont_give_up-xxl.mp3 with uid amarok-sqltrackuid://a6ad1450f0f970f6581d010679bb3db5 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/103-peter_gabriel-sledgehammer-xxl.mp3 with uid amarok-sqltrackuid://50f8836e38603687e57fa1ad82e17073 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/102-peter_gabriel-shock_the_monkey-xxl.mp3 with uid amarok-sqltrackuid://585f5b27bf0e6680f3274a90dda458cc already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica/Peter_Gabriel-Hit-2CD-RETAIL-2003-XXL/101-peter_gabriel-solsbury_hill-xxl.mp3 with uid amarok-sqltrackuid://d3b47517b78e5b73316d364f81fa74c2 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/06. Christmas Eve. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://93cb9929ab5a9a19fea8fb7b5c21a9e1 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/05. The Snow Maiden- IV - Dance of the Tumblers. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://37c4a10d29ad026a03366d576a3ee11d already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/04. The Snow Maiden- III - The Procession of Tsar Berendey. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://9230d153dbb42dc7ddc8b0bfc0c21ceb already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/03. The Snow Maiden- II - Dance of the Birds. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://17178e4845019b96200b309f582b9cbd already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/02. The Snow Maiden- I - Beautiful Spring. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://f07205b999d04b599c1332dc5d164a50 already committed. There seems to be a duplicate uid.
Track /media/esterno_xfs/data/Musica_2/Rimsky-Korsakov/CD 1/01. May Night - Overture. Rimsky-Korsakov.flac with uid amarok-sqltrackuid://5868981f4da2ac3a94524ee8efb2fcfe already committed. There seems to be a duplicate uid.

Reproducible: Always

Steps to Reproduce:
0. exit from amarok
1. remove the folder amarok from $HOME/.kde4/share/apps/
2. remove the files amarok* from $HOME/.kde4/share/config/
3. restart amarok and configure mysql 
5. configure the collation path and start the new scan.
6. I've enabled id3 tags




Actual Results:  
The scan fails
Comment 1 Myriam Schweingruber 2011-06-13 10:44:59 UTC
Please run amarokcollectionscanner in a konsole and check for failures there.

The log you point above shows you have duplicates that are already in the collection, those will not show unless you change the id3 tags to separately identify them.
Comment 2 Ralf Engels 2011-06-16 12:01:17 UTC
For me it seems to be unlikely that you have 7000 duplicate tracks.
There might be another problem there.

Could you search for an album that is not imported and then execute the amarok collection scanner on this directory only? (it's a seperate programm called amarok_collectionscanner)

Also you might try to "touch" the missing directory and select "update collection" from the menu. Look at the debug output.
Comment 3 Myriam Schweingruber 2011-07-18 06:53:23 UTC
Any news on this? Without your feedback we can't do much and will have to close this report.
Comment 4 Jonathan Mast 2011-08-16 12:43:30 UTC
I am experiencing a similar problem.Only one of the tracks(track 9) from this album show up in amarok. Here is the output from amarokcollectionscanner:

<?xml version="1.0" encoding="UTF-8"?>
<scanner count="1">
    <!--Created by amarokcollectionscanner 2.4.0onTue Aug 16 08:37:13 2011-->
    <directory>
        <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/</path>
        <rpath></rpath>
        <mtime>1313497747</mtime>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 1.ogg</path>
            <rpath>Track 1.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>1</track>
            <bitrate>128</bitrate>
            <length>167000</length>
            <samplerate>44100</samplerate>
            <filesize>2404095</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 10.ogg</path>
            <rpath>Track 10.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>10</track>
            <bitrate>128</bitrate>
            <length>174000</length>
            <samplerate>44100</samplerate>
            <filesize>2456386</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 11.ogg</path>
            <rpath>Track 11.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>11</track>
            <bitrate>128</bitrate>
            <length>144000</length>
            <samplerate>44100</samplerate>
            <filesize>2037452</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 12.ogg</path>
            <rpath>Track 12.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>12</track>
            <bitrate>128</bitrate>
            <length>133000</length>
            <samplerate>44100</samplerate>
            <filesize>1889108</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 13.ogg</path>
            <rpath>Track 13.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>13</track>
            <bitrate>128</bitrate>
            <length>201000</length>
            <samplerate>44100</samplerate>
            <filesize>2890691</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 14.ogg</path>
            <rpath>Track 14.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>14</track>
            <bitrate>128</bitrate>
            <length>145000</length>
            <samplerate>44100</samplerate>
            <filesize>2072088</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 2.ogg</path>
            <rpath>Track 2.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>2</track>
            <bitrate>128</bitrate>
            <length>212000</length>
            <samplerate>44100</samplerate>
            <filesize>2986082</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 3.ogg</path>
            <rpath>Track 3.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>3</track>
            <bitrate>128</bitrate>
            <length>200000</length>
            <samplerate>44100</samplerate>
            <filesize>2839577</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 4.ogg</path>
            <rpath>Track 4.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>4</track>
            <bitrate>128</bitrate>
            <length>155000</length>
            <samplerate>44100</samplerate>
            <filesize>2199290</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 5.ogg</path>
            <rpath>Track 5.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>5</track>
            <bitrate>128</bitrate>
            <length>179000</length>
            <samplerate>44100</samplerate>
            <filesize>2571410</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 6.ogg</path>
            <rpath>Track 6.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>6</track>
            <bitrate>128</bitrate>
            <length>198000</length>
            <samplerate>44100</samplerate>
            <filesize>2901554</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 7.ogg</path>
            <rpath>Track 7.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>7</track>
            <bitrate>128</bitrate>
            <length>162000</length>
            <samplerate>44100</samplerate>
            <filesize>2310408</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 8.ogg</path>
            <rpath>Track 8.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>8</track>
            <bitrate>128</bitrate>
            <length>131000</length>
            <samplerate>44100</samplerate>
            <filesize>1872898</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
        <track>
            <uniqueid>amarok-sqltrackuid://</uniqueid>
            <path>/home/school/Music/Altar Of Praise Chorale/Praise to the Lord/Track 9.ogg</path>
            <rpath>Track 9.ogg</rpath>
            <filetype>2</filetype>
            <artist>Altar Of Praise Chorale</artist>
            <album>Praise to the Lord</album>
            <noCompilation/>
            <genre>Gospel &amp; Religious</genre>
            <year>1</year>
            <track>9</track>
            <bitrate>128</bitrate>
            <length>169000</length>
            <samplerate>44100</samplerate>
            <filesize>2376870</filesize>
            <mtime>1312498738</mtime>
            <trackGain>-1</trackGain>
            <trackPeakGain>-1</trackPeakGain>
            <albumGain>-1</albumGain>
            <albumPeakGain>-1</albumPeakGain>
        </track>
    </directory>
</scanner>
Comment 5 Ralf Engels 2011-08-16 13:30:08 UTC
Seen the problem before.

Look at the unique ids of your tracks. They are all the same, so only one gets imported.

In your case run the amarok_afttagger on the directory. This will re-set the track ids and that should solve the problem (which we wouldn't have had in the first place if we would just import everything).
Comment 6 Jonathan Mast 2011-08-17 00:01:21 UTC
THANKS! That did it!
Comment 7 giggi1999 2011-08-17 05:45:11 UTC
But the amarok unique id should like to a random alphanumeric string.
in the case of dmastboys  amarok has not generated an unique id.

In my case I've observed that amarok in some case generate some identical unique_id, for the same file name or title.

amarok_aftertagger is too slow for a big collection; like the mine.
Comment 8 Ralf Engels 2011-08-17 11:28:03 UTC
The amarok unique ids are created from the track title/artist/album. In the case where those informations are not available the algorithm will fall back to a hash of a couple of hundred bytes from the start of the file.

That means that tracks with the same tags will get the same unique ids which leads back to the original problem.

I am just explaining the details here. I didn't invent them. It's just the way Amarok is currently working.
Comment 9 Salvo "LtWorf" Tomaselli 2011-11-17 14:42:13 UTC
Two songs could have the same singer/title but for example one could be live and the other not.
IMHO it would make much more sense to prompt the user about possible duplicates and let them decide if they want to delete those or not.
Comment 10 Ralf Engels 2011-11-17 15:09:57 UTC
Hi Salvo,
completely agree.
You might want to vote for the bug: 258555

*** This bug has been marked as a duplicate of bug 258555 ***