Bug 269451 - MTP media player is identified as a camera by solid
Summary: MTP media player is identified as a camera by solid
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-udev (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-26 11:17 UTC by Arthur
Modified: 2012-04-28 20:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur 2011-03-26 11:17:16 UTC
Version:           2.4.0 (using KDE 4.6.1) 
OS:                Linux

After launching Amarok, the previously connected sony nwz-e438f via usb disappears from Dolphin's Places and shows up in Amarok's collection correctly. But it does not matter if I unmount it inside Amarok and/or quit Amarok, it does only appear in Amarok's collection until I plug out and in the player.

Reproducible: Always

Steps to Reproduce:
-Connect a nwz-e438f player via usb.
-Launch Amarok.
-Wait until the player appear in the local collection.
-Close Amarok.

Actual Results:  
The player can only be reached through Amarok.

Expected Results:  
I can use the player again in Dolphin.
Comment 1 Myriam Schweingruber 2011-03-26 12:19:57 UTC
Does your player have an automatic mode? Since Dolphin only shows the USB mode, if it is mounted in MTP mode in Amarok which I believe is the default, it simply can't show in Dolphin as the latter does not support hte MTP mode. That is not a bug, unless you set it to MSC (aka USB) mode and it doesn't show in both places.
Comment 2 Arthur 2011-03-26 14:35:19 UTC
Before I start Amarok, I can browse it in Dolphin.
After I start Amarok, the next time I can see it in Dolphin is when I plug in the player again.
Comment 3 Myriam Schweingruber 2011-03-28 14:40:12 UTC
Sadly you did not answer my question: does your player support an automatic mode switch between MSC and MTP mode? If yes, you should avoid to use that.
Comment 4 Arthur 2011-03-28 20:44:43 UTC
I'm sorry. There is no such option in the player.

I did not mention that Solid recognizes the player as a camera and offers a second way to browse the player in Dolphin but opens camera:/ folder. I believe that Amarok mounts properly the player, and Solid does not, that's why it appears in Dolphin and then disappears until the next plug in. In this case you are right, it is not the mistake of Amarok.
Comment 5 Myriam Schweingruber 2011-03-29 14:47:29 UTC
Which is indeed quite interesting. Reassigning to Solid
Comment 6 Alex Fiestas 2012-04-22 02:22:27 UTC
This should be fixed now, MPT devices are no longer detected as Cameras.

If you can reproduce this bug with KDE 4.8 please don't hesitate to reopen this bug !
Comment 7 Matěj Laitl 2012-04-28 20:54:05 UTC
Git commit 3c1c788cc52e166278af2ed878e8a2f65874b1ac by Matěj Laitl.
Committed on 30/10/2011 at 13:53.
Pushed by laitl into branch 'KDE/4.8'.

udev PortableMediaPlayer: read protocols from media-player-info

This is a second attempt at implementing PortableMediaPlayer for udev
back-end using media-player-info [3], the first attempt was [2] by
Alex Merry and this patch is heavily based on it. This patch relates to
a discussion at [1] and is just a first step, the second would
be to forward PMP interface from udev backed to udisks backed somehow
(udisks...Device interface provides NativePath attribute that links to
sysfs path that can help - on Linux)

[1] http://mail.kde.org/pipermail/kde-hardware-devel/2011-October/001481.html
[2] https://svn.reviewboard.kde.org/r/5853/
[3] http://www.freedesktop.org/wiki/Software/media-player-info

Care is taken not to change existing behaviour - e.g. when udev env
ID_MEDIA_PLAYER equals 1, behaviour is unchanged.

PACKAGERS, solid udev backend now has following optional runtime-only
dependency that provides udev rules and other info for identification
of the portable media players:
 * media-player-info: for identifying USB storage devices and iPods

Following packages also provide relevant udev rules, but we suggest not
depending on them as they should by pulled by packages that actually
use them (such as Amarok, transitively):
 * usbmuxd: for identifying iOS-based iPods
 * libmtp >= 1.0.4: for identifying MTP players

[I will push similar change to frameworks branch, too]
Related: bug 253671, bug 269447
REVIEW: 103028
FIXED-IN: 4.8.4
DIGEST: groundwork for better portable media player detection
CCMAIL: kde-packager@kde.org

M  +26   -0    solid/solid/CMakeLists.txt
M  +1    -1    solid/solid/backends/udev/udevdevice.cpp
M  +1    -1    solid/solid/backends/udev/udevmanager.cpp
M  +98   -6    solid/solid/backends/udev/udevportablemediaplayer.cpp
M  +8    -0    solid/solid/backends/udev/udevportablemediaplayer.h
M  +17   -2    solid/solid/ifaces/portablemediaplayer.h
A  +135  -0    solid/solid/xdgbasedirs.cpp     [License: LGPL (v2+)]
A  +112  -0    solid/solid/xdgbasedirs_p.h     [License: LGPL (v2+)]

http://commits.kde.org/kdelibs/3c1c788cc52e166278af2ed878e8a2f65874b1ac