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 547363 - Copying track to PSP incorrectly appends additional audio folder
Copying track to PSP incorrectly appends additional audio folder
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Removable Media
0.11.x
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 530658 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-08-12 00:33 UTC by Jason Conti
Modified: 2008-11-14 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Conti 2008-08-12 00:33:12 UTC
Please describe the problem:
Assume the mount point of a PSP (Playstation Portable) is /media/disk.
When copying a track to the PSP source in Rhythmbox, the file is copied to /media/disk/PSP/MUSIC/PSP/MUSIC, when it should be copied to /media/disk/PSP/MUSIC. I tracked down the problem to two functions:

impl_get_mount_path in plugins/generic-player/rb-psp-source.c
impl_build_dest_uri in plugins/generic-player/rb-generic-player-source.c

impl_get_mount_path returns /media/disk/PSP/MUSIC, but impl_build_dest_uri assumes this is the mount point /media/disk, not the audio folder, so impl_build_dest_uri appends the audio folder again (which it gets from Hal).
I managed to fix it in 0.11.6 by changing impl_get_mount_path to return the
mount path /media/disk rather then the audio folder path. I'm not sure if this
is a bug in the psp source or in impl_build_dest_uri (although with a name like
impl_get_mount_path I would think that it should return the mount path, not the
audio folder path).

The problem still exists in svn, but I couldn't get it working there for other reasons (it seems to expect a newer version of glib than I have, was causing me to seg fault), although the fix for the incorrect path is almost identical.

Steps to reproduce:
1. Mount a PSP
2. Drag a track from the library to the PSP source
3. Check the PSP audio folder, path will be something like 
/media/disk/PSP/MUSIC/PSP/MUSIC/<copied folders> instead of 
/media/disk/PSP/MUSIC/<copied folders>


Actual results:
see 3

Expected results:
see 3

Does this happen every time?
yes

Other information:
There is also a problem that the PSP only supports one level of folder depth,
but Rhythmbox copies files to <artist>/<album>/<track>, but I figured out this
isn't a Rhythmbox problem but a Hal problem. The default fdi config doesn't
set the folder_depth option like it should. Add the folder_depth option to that
file (hal/fdi/information/10freedesktop/10-usb-music-players.fdi)and it works
fine.
Comment 1 Jonathan Matthew 2008-08-12 13:25:18 UTC
I think the real answer here is to allow subclasses of RBGenericPlayerSource to provide device information (list of folders, folder depth, audio formats, etc.).  I've just fixed a few bits and pieces in there, but not the main issue.
Comment 2 Jason Conti 2008-08-13 14:51:45 UTC
I tested out the patch, and it fixes my main problem (the files are now copied to the correct place). Thank you very much for that.

Most of that info should already be available in Hal, although it would be nice to be able to override it if it is missing (like the folder depth).
Comment 3 Norbert Lange 2008-10-04 01:22:49 UTC
*** Bug 530658 has been marked as a duplicate of this bug. ***
Comment 4 Bastien Nocera 2008-11-14 22:35:04 UTC
With those 2 patches:
http://lists.freedesktop.org/archives/hal/2008-November/012605.html
http://lists.freedesktop.org/archives/hal/2008-November/012625.html

And the recent changes I made to the PSP source, adding files to the top-level music folder should work as expected.

I'm working on playlist support in bug 560864.