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 375140 - correct folder depth property not being read from HAL
correct folder depth property not being read from HAL
Status: RESOLVED NOTABUG
Product: banshee
Classification: Other
Component: Device - USB Mass Storage
0.11.0
Other All
: Normal normal
: 2.x
Assigned To: Gabriel Burt
Gabriel Burt
Depends on:
Blocks:
 
 
Reported: 2006-11-14 15:32 UTC by Alex Sutcliffe
Modified: 2006-12-20 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alex Sutcliffe 2006-11-14 15:32:54 UTC
Please describe the problem:
My mass storage device - lsusb shows:

Bus 001 Device 007: ID 10d6:1100 Actions Semiconductor Co., Ltd MPMan MP-Ki 128 MP3 Player/Recorder

only supports playback from directories to a depth of 1 on the filesystem so I added the line:

<append key="portable_audio_player.folder_depth" type="int">0</append>

to the appropriate section in 10-usb-music-players.fdi

When dragging a song to the device eg AM 180 fro mthe album Under the Western Freeway by Grandaddy - the file gets created in the following path:

G/Gr/Gra/Gran/Grand/Granda/Grandad/Grandaddy/Under\ the\ Western\ Freeway/

This would suggest that the folder depth has been set to 10. Sure enough, checking the value returned by:

player_device.GetPropertyInteger("portable_audio_player.folder_depth");

shows that it returns 10. This happens regardless of the value in the fdi file ie if folder depth is set to 3, it will still return 10 

Steps to reproduce:
1. Unplug mass storage device
2. Add section <append key="portable_audio_player.folder_depth" type="int">0</append> to the section of 10-usb-music-players.fdi for your player
3. Plug the device in and start banshee
4. Attempt to copy a song from your library to the mass storage player
5. Check where the file has actually been created on the filesystem for your mas storage player


Actual results:
Song will be created in a folder such as:

G/Gr/Gra/Gran/Grand/Granda/Grandad/Grandaddy/Under\ the\ Western\ Freeway/

Expected results:
Since the folder depth property has been set to 0, the file should be in the root directory of the mass storage players filesystem.

Does this happen every time?
Yes

Other information:
Comment 1 Gabriel Burt 2006-11-28 05:36:41 UTC
I have no idea why this is happening.  For me, it returns depth = 8 when I set it to 0.  Any ideas, Alp?
Comment 2 alp 2006-12-15 08:13:17 UTC
I tried this with DBUS_VERBOSE=1

This warning is reported by managed D-Bus error detection code:

Warning: The signature of the message does not match that of the handler

I made the error reporting code more verbose and found this:

member: GetPropertyInteger
Warning: The signature of the return message does not match that of the handler: Expected="i", got="s"
val: age.vendor

This means that HAL's GetPropertyInteger returns a string value with value "age.vendor" on my system, not an integer as the hal-sharp interface bundled with Banshee expects.

(I also confirmed this result manually by dumping the full body of the message.)
Comment 3 David Zeuthen (not reading bugmail) 2006-12-15 16:17:16 UTC
Can you attach the output of lshal for this particular device? Thanks.
Comment 4 David Zeuthen (not reading bugmail) 2006-12-15 16:42:06 UTC
You have to use the "merge" directive, not "append" since the latter is only used for strlist's. 
Comment 5 Alex Sutcliffe 2006-12-20 13:51:38 UTC
Thanks David, using "merge" rather than "append" works perfectly - tested with folder depths of 0, 1 and 5.

Unless anyone else has a persistent problem this can be closed.