GNOME Bugzilla – Bug 323094
Identify media by UID instead of mount point
Last modified: 2018-05-24 10:56:34 UTC
Please describe the problem: I have all my music collection on a removable USB hard disk and if the disk is mounted and unmounted while rhythmbox is loaded, rhythmbox used to hide and display the tracks. This was one of the coolest things of rhythmbox and the only music player that handled music on a removable drive properly. Unfortunately, in the HEAD version (which used to work a few days ago) this no longer happens. Steps to reproduce: 1. Have collection on removable media 2. Mount/unmount the drive while rb loaded 3. Look at the library and see if the relavant songs are hidden or shown as appropriate Actual results: When I unmount the songs still appear in the library even though they are no longer available. If not mounted when started the library is empty and then mounting does not make the songs appear. Expected results: Does this happen every time? yes Other information:
Created attachment 55570 [details] [review] patch This will cause Rhythmbox not to delete db entries even when the mountpoint is mounted, and only remove them after not being seen for 45 days. Doing that also fixes problems caused if two different removable media (one with you music) gets mounted on the same mountpoint at different times. The only downside I can think of is that you will have stale db entries present if you actually do delete (or move) your music. This will make RB take longer to load.
Is it not possible to use the serial number of the device attached as a means of identifying it instead of using the mount point (because two different devices may get mounted at the same mount point so this is not reliable). Then you wouldn't need the 45 day thing. The serial number should be able to be retrieved from the HAL library shouldn't it? This would seem to be the most reliable way to do it as then the library would really know which device a file in the library is stored on and not where it appears mounted.
I've committed the patch, as it was needed for some fixes on bug 323096 (as well as for this bug). Using a device serial number would work for most removable media, but wouldn't work for other things like network mounts. What would be *really* nice was is Rhythmbox stored the serial number (or equivalent) so that it could tell when the same thing has been mounted on a different mountpoint.
Yes that would be cool. If rb could distinguish between removeable media when possible and otherwise use the mount point when not. For network shares I think the mount point is fine. For removeable media though the serial number would be a much more reliable way of doing it. I have 2 USB disks and Gnome mounts them both at the same mount point (/media/TREKSTOR). I have to make sure I plug the one with my music in first otherwise rb will get confused...
Eetitling to reflect actual issue
*** Bug 592502 has been marked as a duplicate of this bug. ***
-- 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/99.