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 133109 - Duplicate Song Management
Duplicate Song Management
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 145707 651891 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-01 12:22 UTC by Sebastien Bacher
Modified: 2018-05-24 10:29 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Sebastien Bacher 2004-02-01 12:22:54 UTC
This bug was originally reported in the Debian BTS:
http://bugs.debian.org/227639

"Rhythmbox should include some duplicate song management dialogs so that if
you insert two copies of the same song, a prompt will appear and ask which
one you wish to keep.  For instance, I have a collection of mp3s and oggs
in my music folder (mp3/ and ogg/, respectively).  I keep the mp3s around
for my iPod and the oggs because they just sound better and are OSS.  I
would like to be able to import everything from my mp3 directory first, and
then import from my ogg directory and overwrite the duplicated mp3s.  

The UI would be very simple.  Any duplicates in all id3 fields or filenames
(minus extension) would prompt a dialog saying: 

"Song X already exists.  Would you like to replace it?

[ Replace ] [ Replace All ] [ Skip ] [ Skip All ] [ Cancel Import ]"

Or something to that effect.

What do you think?"
Comment 1 ricardo quesada 2004-04-07 12:52:10 UTC
yes, also consider this other case:

A new user starts using rb.
He adds to "library" all his .mp3.
And then he wants to import his playlists (Music -> Playlists -> load from
file). The songs of these playlist will be added to "library" without detecting
duplicates having most of the songs duplicated :(
using rb 0.6.10.
This is very annoying.
Comment 2 Nickolay V. Shmyrev 2006-01-09 10:18:17 UTC
*** Bug 145707 has been marked as a duplicate of this bug. ***
Comment 3 Nickolay V. Shmyrev 2006-01-09 10:19:02 UTC
Some ideas from the bug above:

Perhaps one could do it by preferring free formats to MP3 and MP3s with higher
bitrate to MP3s with a lower one. Of course, songs with variable bitrate
wouldn't fit this pattern...

It might be a good idea to leave the responsibility with the user. Just offering
some choices like "Only play first occuring version", "Always play Ogg", "Always
play file with highest bitrate" for default settings in Preferences could be a
way to do it. I suppose there's no way to see what encoder has been used from
the contents of an MP3-file? Otherwise, this info could also be used by letting
the user specify an encoder-hierarchy in Preferences. It probably would end up
being a rather bloated set of options, though. :-)
Comment 4 Adam Sweet 2006-01-22 01:22:17 UTC
Consider another scenario again. A user has all of their music files in one directory with subdirectories. They add a large number of new files/directories to that directory and it's hard to select all of the new files and directories so they just import the whole parent directory again. Result: a whole heap of repeat entries.

Perhaps consider a Remove Duplicates function or a 'Do not Import Duplicates' option when importing. Or a 'Sync against filesystem'.

I would be very grateful for this kind of feature.
Comment 5 Alex Lancaster 2006-03-14 11:26:49 UTC
See this thread:

http://mail.gnome.org/archives/rhythmbox-devel/2006-March/thread.html#00021

for some discussion on the ML.  Specifically James "Doc" Livingston's suggestions at: 

http://mail.gnome.org/archives/rhythmbox-devel/2006-March/msg00022.html

> (duplicate detection) is [...] difficult, as detecting when one
> file is a duplicate of another is a hard problem. Some potential
> solutions are:

> * MD5 (or similar) summing of files. This will only detect *exact*
> duplicates, and not work if anything changes the file, such as editing
> tags.

> * Matching <duration, mime-type, artist/album/track>. Would work
> reasonably well - but not detect badly-tagged tracks, duplicates in
> different formats, or copies with extra leading/trailing silence.

> * Audio fingerprinting (e.g. musicbrainz). Fairly slow, but would work
> well. Also useful for implementing tag-lookup on audio files.
Comment 6 Michel Alexandre Salim 2006-11-05 00:38:58 UTC
Could a simpler fix be implemented that checks whether a given filename already exists in the database before adding it? I end up with lots of duplicate files if I turn on the option for Rhythmbox to track changes to its music folder.
Comment 7 Mario Vukelic 2008-11-01 12:33:25 UTC
A complete solution as reference in comment #5 is certainly hard, but I store everything as flac and then convert to mp3. The file names and tags of the flac files are imported from MusicBrainz and/or edited if needed. When converted to mp3 they remain are the same, and even solving only this case would be a tremendous help.

Also, a related UI concern: I was convinced that "Edit->Preferences->Music->Preferred format: *.flac" would achieve exactly what is asked in this bug report. Sounds exactly like it, and the docs are no help to find out the actual purpose of this setting, as far as I can find.
Comment 8 Neil Loknath 2009-01-22 03:06:18 UTC
I would even be happy with a solution similar to that of iTunes "Show Duplicates" option.  You select the option from the menu, and only duplicates are shown.  Then the user can delete/move/rename as they wish.  Comparison with filename and tags is good enough for me.  Specifically, title and artist tags.
Comment 9 Brett Alton 2009-06-22 16:57:43 UTC
I wasn't aware tath Rhythmbox didn't have this option until I was requested by my sister to get rid of her duplicate songs. I did some research and it appears that iTunes is the only music player to have this feature.

How could this be accomplished? It seems like a simple comparison of ID3 tags and then of filesize (or MD5/SHA1) of the two files could give a moderate list of duplicate songs. Then Rhythmbox could have a special section, similar to 'Missing Files' called 'Duplicate Files' and the user could then choose to remove the duplicates.
Comment 10 scrawl 2010-05-15 22:21:07 UTC
Hi,

I have made a simple python plugin to achieve this goal. Duplicates are shown in a seperate source, similiar to the "Missing files" source. You can find the bzr branch here: https://code.launchpad.net/~scrawl/rb-record-station/trunk
Comment 11 Jonathan Matthew 2011-06-04 22:44:57 UTC
*** Bug 651891 has been marked as a duplicate of this bug. ***
Comment 12 GNOME Infrastructure Team 2018-05-24 10:29:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/27.