GNOME Bugzilla – Bug 519737
Duplicate tracks added to library after pluging in ipod
Last modified: 2008-03-17 09:35:27 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
Why did nautilus start to do that in the 1st place ?
you need to ask the nautilus guys, gnome-volume-manager used to do the job and now it's gvfs and nautilus
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.
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.
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.
Instead of that? + if (playlist_source == NULL || rb_source_want_uri (playlist_source, uri) < 100) { Could do, will need to test.
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)
the change doesn't work correctly, rhythmbox switched to the ipod when it's plugged but the library still has the ipod tracks listed
ejecting also crashes rhythmbox when using this change
(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.
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