don't show mtp devices until successfully opened
Submitted by Martin Pitt
Link to original bug (#615743)
Description
When I plug in my PTP camera, it appears in Rhythmbox as an audio device. Of course there aren't any songs on it, and it does not have any kind of music profile. Now, on a protocol level MTP and PTP are very similar, but my camera neither gets a /dev/libmtp* symlink (/lib/udev/rules.d/45-libmtp8.rules) nor an ID_MEDIA_PLAYER tag (from media-player-info). I think rhythmbox should ignore devices which don't have either.
For completeness, some data:
lsusb -vvv: Bus 001 Device 014: ID 04a9:31c0 Canon, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04a9 Canon, Inc. idProduct 0x31c0 bcdDevice 0.02 iManufacturer 1 Canon Inc. iProduct 2 Canon Digital Camera iSerial 3 C767F1C714174C309255F70E4A7B2EE2 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 6 Imaging bInterfaceSubClass 1 Still Image Capture bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0001 Self Powered
gvfs-mount -li:
Volume(0): Canon Digital Camera Type: GProxyVolume (GProxyVolumeMonitorGPhoto2) ids: unix-device: '/dev/bus/usb/001/016' activation_root=gphoto2://[usb:001,016]/ themed icons: [camera-photo] can_mount=1 can_eject=0 should_automount=1 Mount(0): Canon Digital Camera -> gphoto2://[usb:001,016]/ Type: GProxyShadowMount (GProxyVolumeMonitorGPhoto2) default_location=gphoto2://[usb:001,016]/ themed icons: [camera-photo] x_content_types: x-content/image-dcf can_unmount=1 can_eject=0 is_shadowed=0 Mount(1): Canon Digital Camera -> gphoto2://[usb:001,016]/ Type: GDaemonMount default_location=gphoto2://[usb:001,016]/ themed icons: [camera-photo] [camera] x_content_types: x-content/image-dcf can_unmount=1 can_eject=0 is_shadowed=1
udev data: P: /devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8.3/1-8.3.3 N: bus/usb/001/016 S: char/189:15 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8.3/1-8.3.3 E: MAJOR=189 E: MINOR=15 E: DEVNAME=/dev/bus/usb/001/016 E: DEVTYPE=usb_device E: DRIVER=usb E: PRODUCT=4a9/31c0/2 E: TYPE=0/0/0 E: BUSNUM=001 E: DEVNUM=016 E: SUBSYSTEM=usb E: ID_VENDOR=Canon_Inc. E: ID_VENDOR_ENC=Canon\x20Inc. E: ID_VENDOR_ID=04a9 E: ID_MODEL=Canon_Digital_Camera E: ID_MODEL_ENC=Canon\x20Digital\x20Camera E: ID_MODEL_ID=31c0 E: ID_REVISION=0002 E: ID_SERIAL=Canon_Inc._Canon_Digital_Camera_C767F1C714174C309255F70E4A7B2EE2 E: ID_SERIAL_SHORT=C767F1C714174C309255F70E4A7B2EE2 E: ID_BUS=usb E: ID_USB_INTERFACES=:060101: E: ID_GPHOTO2=1 E: GPHOTO2_DRIVER=PTP E: ACL_MANAGE=1 E: DEVLINKS=/dev/char/189:15
Version: 0.12.x