From 7fdec719a6c2edfb2316591e8263fbe72a3fc4fb Mon Sep 17 00:00:00 2001 From: Francois Andriot Date: Sun, 19 May 2013 16:16:15 +0200 Subject: Use hal to detect media types in halbackend --- tdeioslave/media/mediamanager/halbackend.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tdeioslave/media/mediamanager') 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 { -- cgit v1.2.1