After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623441 - Importing duplicates items which have some punctuation marks in their filename
Importing duplicates items which have some punctuation marks in their filename
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Importing
1.6.1
Other Linux
: Normal major
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 627267 630663 632112 639282 639982 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-07-02 23:50 UTC by klji
Modified: 2011-01-19 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Work-around (916 bytes, patch)
2010-10-14 10:19 UTC, Alexander Kojevnikov
committed Details | Review

Description klji 2010-07-02 23:50:46 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.
Comment 1 klji 2010-07-03 02:41:45 UTC
I just noticed that a plus sign in the track filename will have the same effect.
Comment 2 Gabriel Burt 2010-07-13 19:34:44 UTC
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
Comment 3 Michael Martin-Smucker 2010-10-14 02:51:38 UTC
*** Bug 630663 has been marked as a duplicate of this bug. ***
Comment 4 Michael Martin-Smucker 2010-10-14 02:52:29 UTC
*** Bug 632112 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Kojevnikov 2010-10-14 10:19:02 UTC
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"
Comment 6 Alex L. Mauer 2010-10-14 14:15:23 UTC
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)
Comment 7 Alexander Kojevnikov 2010-10-18 07:15:14 UTC
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.
Comment 8 nyall 2010-10-18 22:58:59 UTC
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!
Comment 9 nyall 2010-10-18 22:59:45 UTC
I should add that I can be available on IRC for patch testing/further debugging if required.
Comment 10 Alexander Kojevnikov 2010-10-18 23:07:57 UTC
(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.
Comment 11 nyall 2010-10-18 23:10:56 UTC
Yes - that looks right. So I guess the duplicates issue IS fixed by the commit, and 631970 is a separate, but related, issue.
Comment 12 David Nielsen 2010-11-01 12:41:49 UTC
*** Bug 633656 has been marked as a duplicate of this bug. ***
Comment 13 David Nielsen 2010-12-17 20:28:12 UTC
*** Bug 627267 has been marked as a duplicate of this bug. ***
Comment 14 John Thacker 2011-01-12 04:39:40 UTC
*** Bug 639282 has been marked as a duplicate of this bug. ***
Comment 15 David Nielsen 2011-01-19 20:09:17 UTC
*** Bug 639982 has been marked as a duplicate of this bug. ***