GNOME Bugzilla – Bug 623441
Importing duplicates items which have some punctuation marks in their filename
Last modified: 2011-01-19 20:09:17 UTC
Banshee 1.6.1-8.3 started on a new openSUSE 11.3-RC2 install and made to import data for the first time. Banshee lists some songs twice. So far as I see, it duplicates song if they: * have a comma in the track's filename (folder name irrelevant) * have an ampersand in the track's filename (") Metadata is irrelevant too, as I know at least one affected song with a very long title had the comma clipped out of its metadata. So, my files are in the format: ../Artist/2000 Album/01 - Song.flac If the track's filename has a comma or ampersand, it always duplicates in Banshee.
I just noticed that a plus sign in the track filename will have the same effect.
We must not be URL encoding the URLs we pass in to see if they exist in the db. The problem likely starts here: http://git.gnome.org/browse/banshee/tree/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseImportManager.cs#n165
*** Bug 630663 has been marked as a duplicate of this bug. ***
*** Bug 632112 has been marked as a duplicate of this bug. ***
Created attachment 172337 [details] [review] Work-around Alex (the reporter of duplicated bug 632112) told me on IRC earlier today that this patch fixes the problem for him. I'm hesitant to commit it right away because: a) I can't reproduce the problem, on my box the ',' character is not percent-encoded in either case (see also bug 632112, comment 1). b) Obviously something wrong is going on in StreamTagger.TrackInfoMerge(), overriding the track's URI after calling the method from DatabaseImportManager.ImportTrack() is kind of hacky and doesn't fix the root cause of the problem. I really need to be able to reproduce the issue in order to move forward. Could you tell me which check boxes you have ticked off on the first tab in Preferences? Also, which IO provider do you use? You can check this with: % banshee-1 --debug | grep "IO provider"
General preferences are as follows: File Policies: [ ] Copy files to media folders when importing [X] Write metadata to files [ ] Write ratings and play counts to files [ ] Update file and folder names Miscellaneous: [X] Improve Banshee by sending anonymous usage data [ ] Disable features requiring Internet access [X] Enable ReplayGain correction [X] Enable gapless playback IO provider is GIO: [1 Debug 09:10:35.836] IO provider extension loaded (Banshee.IO.Gio.Provider)
Still cannot reproduce this. Since the patch doesn't break anything I committed it both to master and to stable-1.8. Closing as FIXED, feel free to re-open if you can reproduce it and have a better solution.
I'm still seeing this bug (or possibly one very similar) with master branch. The steps I use to replicate it are: 1. Have a track with a comma in the filename (like the original poster reported, characters like + and & also trigger the bug). 2. Import the track for the first time, it appears in the unheard automatic playlist. Play count column shows empty for this track. 3. Play the track, so the playcount increases, track gets removed from the unheard playlist. 4. Rescan the library (or reimport the folder containing the track). The track with the comma in the name re-appears in the unheard playlist, and it's playcount column is cleared. Previous to http://git.gnome.org/browse/banshee/commit/?id=aa40b95bf04ce2c89be391d34c19aec0850bba1e this track would appear as a duplicate in the library, so that commit fixed part of the problem but not all!
I should add that I can be available on IRC for patch testing/further debugging if required.
(In reply to comment #8) > 4. Rescan the library (or reimport the folder containing the track). The track > with the comma in the name re-appears in the unheard playlist, and it's > playcount column is cleared. It's probably the same issue as bug 631970.
Yes - that looks right. So I guess the duplicates issue IS fixed by the commit, and 631970 is a separate, but related, issue.
*** Bug 633656 has been marked as a duplicate of this bug. ***
*** Bug 627267 has been marked as a duplicate of this bug. ***
*** Bug 639282 has been marked as a duplicate of this bug. ***
*** Bug 639982 has been marked as a duplicate of this bug. ***