/[packages]/updates/1/amarok/current/SOURCES/0005-Fix-audiocd-discovery-at-startup.patch
ViewVC logotype

Contents of /updates/1/amarok/current/SOURCES/0005-Fix-audiocd-discovery-at-startup.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137425 - (show annotations) (download)
Thu Sep 1 02:36:57 2011 UTC (12 years, 10 months ago) by mikala
File size: 1868 byte(s)
SILENT: new file ../SOURCES/0005-Fix-audiocd-discovery-at-startup.patch
1 diff -Naur amarok-2.4.3.orig/src/MediaDeviceCache.cpp amarok-2.4.3/src/MediaDeviceCache.cpp
2 --- amarok-2.4.3.orig/src/MediaDeviceCache.cpp 2011-07-28 15:04:45.000000000 +0200
3 +++ amarok-2.4.3/src/MediaDeviceCache.cpp 2011-08-19 12:34:14.000000000 +0200
4 @@ -93,14 +93,8 @@
5 debug() << "Device name is = " << device.product() << " and was made by " << device.vendor();
6
7 const Solid::StorageAccess* ssa = device.as<Solid::StorageAccess>();
8 - const Solid::OpticalDisc * opt = device.as<Solid::OpticalDisc>();
9
10 - if ( opt && opt->availableContent() & Solid::OpticalDisc::Audio )
11 - {
12 - m_type[ device.udi() ] = MediaDeviceCache::SolidAudioCdType;
13 - m_name[ device.udi() ] = device.vendor() + " - " + device.product();
14 - }
15 - else if( ssa )
16 + if( ssa )
17 {
18 if( !m_volumes.contains( device.udi() ) )
19 {
20 @@ -133,6 +127,21 @@
21 m_name[device.udi()] = device.vendor() + " - " + device.product();
22 }
23 }
24 + deviceList = Solid::Device::listFromType( Solid::DeviceInterface::OpticalDisc );
25 + foreach( const Solid::Device &device, deviceList )
26 + {
27 + debug() << "Found Solid::DeviceInterface::OpticalDisc with udi = " << device.udi();
28 + debug() << "Device name is = " << device.product() << " and was made by " << device.vendor();
29 +
30 + const Solid::OpticalDisc * opt = device.as<Solid::OpticalDisc>();
31 +
32 + if ( opt && opt->availableContent() & Solid::OpticalDisc::Audio )
33 + {
34 + debug() << "device is an Audio CD";
35 + m_type[device.udi()] = MediaDeviceCache::SolidAudioCdType;
36 + m_name[device.udi()] = device.vendor() + " - " + device.product();
37 + }
38 + }
39 deviceList = Solid::Device::allDevices();
40 foreach( const Solid::Device &device, deviceList )
41 {
42

  ViewVC Help
Powered by ViewVC 1.1.30