diff options
author | Francois Andriot <[email protected]> | 2013-05-19 16:16:15 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-05-19 16:17:22 +0200 |
commit | 7fdec719a6c2edfb2316591e8263fbe72a3fc4fb (patch) | |
tree | df86d9e500c98098d10a547757add9faa960d4d8 /tdeioslave/media | |
parent | 4186c3efee28de609b9b234baa8a63cd4ad816ac (diff) | |
download | tdebase-7fdec719a6c2edfb2316591e8263fbe72a3fc4fb.tar.gz tdebase-7fdec719a6c2edfb2316591e8263fbe72a3fc4fb.zip |
Use hal to detect media types in halbackend
Diffstat (limited to 'tdeioslave/media')
-rw-r--r-- | tdeioslave/media/mediamanager/halbackend.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tdeioslave/media/mediamanager/halbackend.cpp b/tdeioslave/media/mediamanager/halbackend.cpp index aef7f96db..397c6b662 100644 --- a/tdeioslave/media/mediamanager/halbackend.cpp +++ b/tdeioslave/media/mediamanager/halbackend.cpp @@ -595,19 +595,16 @@ void HALBackend::setVolumeProperties(Medium* medium) medium->setIconName(TQString::null); /* check if the disc id a vcd or a video dvd */ - DiscType type = LinuxCDPolling::identifyDiscType(libhal_volume_get_device_file(halVolume)); - switch (type) - { - case DiscType::VCD: + if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_vcd", NULL)) { mimeType = "media/vcd"; - break; - case DiscType::SVCD: + } + else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_svcd", NULL)) { mimeType = "media/svcd"; - break; - case DiscType::DVD: + } + else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_videodvd", NULL)) { mimeType = "media/dvdvideo"; - break; } + } else { |