[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src
From: Martin Aumüller <aumuell () reserv ! at>
Date: 2009-07-12 17:38:21
Message-ID: 1247420301.754671.21679.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 995421 by aumuell:
enable media device plugins to handle devices without mounted volume (or, according \
to solid, mountable volume)
M +15 -2 MediaDeviceCache.cpp
M +1 -1 MediaDeviceCache.h
--- trunk/extragear/multimedia/amarok/src/MediaDeviceCache.cpp #995420:995421
@@ -107,6 +107,18 @@
}
}
}
+ deviceList = Solid::Device::listFromType( Solid::DeviceInterface::StorageDrive \
); + foreach( const Solid::Device &device, deviceList )
+ {
+ debug() << "Found Solid::DeviceInterface::StorageDrive with udi = " << \
device.udi(); + debug() << "Device name is = " << device.product() << " and \
was made by " << device.vendor(); +
+ if( device.as<Solid::StorageDrive>() )
+ {
+ m_type[device.udi()] = MediaDeviceCache::SolidGenericType;
+ m_name[device.udi()] = device.vendor() + " - " + device.product();
+ }
+ }
KConfigGroup config = Amarok::config( "PortableDevices" );
QMap<QString, QString> manualDevices = config.entryMap();
foreach( const QString &udi, manualDevices.keys() )
@@ -146,8 +158,9 @@
}
else if( device.as<Solid::StorageDrive>() )
{
- debug() << "Storage drive found, will wait for the volume";
- return;
+ debug() << "device is a Storage drive, still need a volume";
+ m_type[udi] = MediaDeviceCache::SolidGenericType;
+ m_name[udi] = device.vendor() + " - " + device.product();
}
else if( ssa )
{
--- trunk/extragear/multimedia/amarok/src/MediaDeviceCache.h #995420:995421
@@ -34,7 +34,7 @@
public:
- enum DeviceType { SolidPMPType, SolidVolumeType, ManualType, \
SolidAudioCdType, InvalidType }; + enum DeviceType { SolidPMPType, \
SolidVolumeType, ManualType, SolidAudioCdType, SolidGenericType, InvalidType };
static MediaDeviceCache* instance() { return s_instance ? s_instance : new \
MediaDeviceCache(); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic