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 519737 - Duplicate tracks added to library after pluging in ipod
Duplicate tracks added to library after pluging in ipod
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: iPod
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-01 14:08 UTC by Sebastien Bacher
Modified: 2008-03-17 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rb-activate-generic-players-from-uri.patch (2.74 KB, patch)
2008-03-03 23:11 UTC, Bastien Nocera
none Details | Review

Description Sebastien Bacher 2008-03-01 14:08:35 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/195875

"Binary package hint: rhythmbox

1) plug ipod in
2) rhythmbox autostarts in response
3) tracks from the ipod were automatically added to the library

The tracks on the ipod are the exact same ones that are already in my library which is pointing at ~/Music.

The ipod tracks in the library are listed as being from a folder in /tmp

Upon ejecting the ipod the extra tracks disappear.

The ipod tracks should not appear in the library at all, they are on a device, not in the library (ignoring the fact they are the exact same files transfered to the ipod!)

This is with Hardy 0.11.4-0ubuntu6"


The new nautilus calls rhythmbox on the ipod when plugged which creates the situation, rhythmbox should rather switch to the ipod source than adding songs to the library
Comment 1 Christophe Fergeau 2008-03-01 14:56:02 UTC
Why did nautilus start to do that in the 1st place ?
Comment 2 Sebastien Bacher 2008-03-01 15:28:37 UTC
you need to ask the nautilus guys, gnome-volume-manager used to do the job and now it's gvfs and nautilus
Comment 3 Bastien Nocera 2008-03-03 16:52:09 UTC
The problem is that in the olden days, gnome-volume-manager passed a device path, not a directory one. So with the new nautilus, we get rhythmbox called with "rhythmbox /media/my_ipod", which will add the songs to the library, instead of treating it as a device.
Comment 4 Bastien Nocera 2008-03-03 23:11:07 UTC
Created attachment 106519 [details] [review]
rb-activate-generic-players-from-uri.patch

I don't really like the "rb_source_want_uri (playlist_source, uri) < 100" bit. But it works as expected.
Comment 5 Jonathan Matthew 2008-03-14 12:27:26 UTC
Wouldn't 'rb_source_uri_is_source (playlist_source, uri) == FALSE' be equivalent there, and nicer to look at?  Otherwise, this looks OK to me.
Comment 6 Bastien Nocera 2008-03-14 12:46:09 UTC
Instead of that?
+			if (playlist_source == NULL || rb_source_want_uri (playlist_source, uri) < 100) {

Could do, will need to test.
Comment 7 Bastien Nocera 2008-03-14 17:04:34 UTC
Works fine with the change above, and committed to trunk.

2008-03-14  Bastien Nocera  <hadess@hadess.net>

	* shell/rb-shell.c (rb_shell_load_uri):
	* sources/rb-removable-media-source.c
	(rb_removable_media_source_class_init), (impl_want_uri),
	(impl_uri_is_source): Fix files from removable devices
	being imported in the main library instead of staying in
	their own source when Rhythmbox is activated from nautilus
	(Closes: #519737)
Comment 8 Sebastien Bacher 2008-03-15 15:06:40 UTC
the change doesn't work correctly, rhythmbox switched to the ipod when it's plugged but the library still has the ipod tracks listed
Comment 9 Sebastien Bacher 2008-03-15 15:17:05 UTC
ejecting also crashes rhythmbox when using this change
Comment 10 Bastien Nocera 2008-03-15 15:31:59 UTC
(In reply to comment #8)
> the change doesn't work correctly, rhythmbox switched to the ipod when it's
> plugged but the library still has the ipod tracks listed

The library won't remove the existing files. As for the crash, please file a separate bug.
Comment 11 Sebastien Bacher 2008-03-17 09:35:27 UTC
those are not in the library, it does the same when removing the rhythmbox directory on the disk, starting rhythmbox, importing some music and plugging an ipod, the ipod songs are added to the library