Bug 275978 - Amarok can't handle media devices with empty uuid
Summary: Amarok can't handle media devices with empty uuid
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Media Devices (show other bugs)
Version: 2.4.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 2.4.2
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-18 14:19 UTC by Igor Poboiko
Modified: 2011-08-30 14:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Poboiko 2011-06-18 14:19:27 UTC
Version:           2.4.1 (using KDE 4.6.4) 
OS:                Linux

First reported there: https://bugs.gentoo.org/show_bug.cgi?id=364649

I have an IRiver LPlayer MP3-player. When I plug it in, it becomes a '/dev/sdc' device in my Linux system. Since it doesn't have an partition table (and all data is stored on /dev/sdc directly), it doesn't have an uuid. So UDisks (which is used by solid as a backend) doesn't know its uuid too, and so does solid.
So amarok can't detect this device, and if it is run with --debug key it shows a string "...has empty uuid" and it won't detect player as an external collection.

Reproducible: Always

Steps to Reproduce:
1. Get a device without partitition table.
2. Plug it in.

Actual Results:  
Amarok should detect it as an external media collection.

Expected Results:  
Nothing happens.

# LANG=C fdisk -l /dev/sdc

Disk /dev/sdc: 3961 MB, 3961520128 bytes
122 heads, 62 sectors/track, 1022 cylinders, total 7737344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   ?           0           0           0    0  Empty

# blkid /dev/sdc
/dev/sdc: LABEL="LPLAYER" TYPE="vfat"

QDBusViewer shows an empty uuid for org.freedesktop.UDisks /org/freedesktop/udisks/devices/sdc IdUuid property

$ amarok --debug >output 2>&1
$ grep -A 2 -B 2 'empty uuid' output
amarok:             [MountPointManager] Factory can't handle device  "/org/freedesktop/UDisks/devices/sdc" 
amarok:             BEGIN: virtual bool MassStorageDeviceHandlerFactory::canHandle(const Solid::Device&) const 
amarok:               [MassStorageDeviceHandler] has empty uuid 
amarok:             END__: virtual bool MassStorageDeviceHandlerFactory::canHandle(const Solid::Device&) const [Took: 0.004s] 
amarok:             [MountPointManager] Factory can't handle device  "/org/freedesktop/UDisks/devices/sdc"
Comment 1 Myriam Schweingruber 2011-06-19 14:28:51 UTC
Not all media players are supported on Linux, sorry. In particular the LPlayer from iRiver doesn't support MTP mode.

Please google for workarounds, we simply depend on the system to use a player.
Comment 2 Igor Poboiko 2011-06-20 09:21:21 UTC
Well, it does support MTP, but that's not the point (I saw such an option in player).
The idea is that I'm using it as an ordinary USB Mass Storage Device (well, and device notifier applet in KDE detects it and suggests me mounting it), and as far as I know amarok supports such kind of devices.
Moreover, I'm absolutely sure it worked some time ago (with some of previous Amarok 2.x versions, maybe 2.1.x or 2.2.x, I'm not sure about version number).
Comment 3 Myriam Schweingruber 2011-06-20 09:58:06 UTC
Reopening based on your comments, sorry for the noise.
Comment 4 Igor Poboiko 2011-08-30 14:01:13 UTC
I've just updated to Amarok 2.4.3 and this bug disappeared. I can see my MP3-player in amarok as an external collection again. Closing this bug then.