summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-05-19 16:16:15 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-05-19 16:58:20 +0200
commit0a42c44d2cfa578af6d2999ddb70da113e7bd787 (patch)
tree38775c029916c6cc7ba2b502869dfecdbbff3381
parent731118ffc52bab58c71ad6012554055a81bbc109 (diff)
downloadtdebase-0a42c44d2cfa578af6d2999ddb70da113e7bd787.tar.gz
tdebase-0a42c44d2cfa578af6d2999ddb70da113e7bd787.zip
Use hal to detect media types in halbackend
(cherry picked from commit 7fdec719a6c2edfb2316591e8263fbe72a3fc4fb)
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index 46fd815c5..a22ce4078 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/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
{