summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediamanager/halbackend.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-05-30 14:52:26 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-05-30 14:52:26 +0900
commit32381684a2eecaaa43616d5bc8ab51780d42e336 (patch)
tree832f6a82dd958e9a9d0a7baf3a486cad155e592d /tdeioslave/media/mediamanager/halbackend.cpp
parentfadfb67a5c1fc28d4b724a51e36dbe03d8fdd196 (diff)
downloadtdebase-32381684a2eecaaa43616d5bc8ab51780d42e336.tar.gz
tdebase-32381684a2eecaaa43616d5bc8ab51780d42e336.zip
Improved support for bluray discs.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeioslave/media/mediamanager/halbackend.cpp')
-rw-r--r--tdeioslave/media/mediamanager/halbackend.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/tdeioslave/media/mediamanager/halbackend.cpp b/tdeioslave/media/mediamanager/halbackend.cpp
index b0cf54b6e..e5fc92dc8 100644
--- a/tdeioslave/media/mediamanager/halbackend.cpp
+++ b/tdeioslave/media/mediamanager/halbackend.cpp
@@ -566,24 +566,45 @@ void HALBackend::setVolumeProperties(Medium* medium)
if ((discType == LIBHAL_VOLUME_DISC_TYPE_CDROM) ||
(discType == LIBHAL_VOLUME_DISC_TYPE_CDR) ||
(discType == LIBHAL_VOLUME_DISC_TYPE_CDRW))
+ {
if (libhal_volume_disc_is_blank(halVolume))
{
mimeType = "media/blankcd";
medium->unmountableState("");
}
else
+ {
mimeType = "media/cdwriter" + MOUNT_MEDIA_SUFFIX;
-
- if ((discType == LIBHAL_VOLUME_DISC_TYPE_DVDROM) || (discType == LIBHAL_VOLUME_DISC_TYPE_DVDRAM) ||
+ }
+ }
+ else if ((discType == LIBHAL_VOLUME_DISC_TYPE_DVDROM) || (discType == LIBHAL_VOLUME_DISC_TYPE_DVDRAM) ||
(discType == LIBHAL_VOLUME_DISC_TYPE_DVDR) || (discType == LIBHAL_VOLUME_DISC_TYPE_DVDRW) ||
(discType == LIBHAL_VOLUME_DISC_TYPE_DVDPLUSR) || (discType == LIBHAL_VOLUME_DISC_TYPE_DVDPLUSRW) )
+ {
if (libhal_volume_disc_is_blank(halVolume))
{
mimeType = "media/blankdvd";
medium->unmountableState("");
}
else
+ {
mimeType = "media/dvd" + MOUNT_MEDIA_SUFFIX;
+ }
+ }
+ else if ((discType == LIBHAL_VOLUME_DISC_TYPE_BDROM) || (discType == LIBHAL_VOLUME_DISC_TYPE_BDR) ||
+ (discType == LIBHAL_VOLUME_DISC_TYPE_BDRE) || (discType == LIBHAL_VOLUME_DISC_TYPE_HDDVDROM) ||
+ (discType == LIBHAL_VOLUME_DISC_TYPE_HDDVDR) || (discType == LIBHAL_VOLUME_DISC_TYPE_HDDVDRW) )
+ {
+ if (libhal_volume_disc_is_blank(halVolume))
+ {
+ mimeType = "media/blankbluray";
+ medium->unmountableState("");
+ }
+ else
+ {
+ mimeType = "media/bluray" + MOUNT_MEDIA_SUFFIX;
+ }
+ }
if (libhal_volume_disc_has_audio(halVolume) && !libhal_volume_disc_has_data(halVolume))
{
@@ -594,13 +615,16 @@ void HALBackend::setVolumeProperties(Medium* medium)
medium->setIconName(TQString::null);
/* check if the disc id a vcd or a video dvd */
- if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_vcd", NULL)) {
+ if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_vcd", NULL))
+ {
mimeType = "media/vcd";
}
- else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_svcd", NULL)) {
+ else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_svcd", NULL))
+ {
mimeType = "media/svcd";
}
- else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_videodvd", NULL)) {
+ else if (libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_videodvd", NULL))
+ {
mimeType = "media/dvdvideo";
}