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 16:57:25 +0900
commitcbbf46ebb6287b34d0bca3cb06796e01183562ed (patch)
tree24787ce212db7f388a366643391ede4f6b684be1 /tdeioslave/media/mediamanager/halbackend.cpp
parentec4f0efe77766b2a242787c70a98a560fd266a44 (diff)
downloadtdebase-cbbf46ebb6287b34d0bca3cb06796e01183562ed.tar.gz
tdebase-cbbf46ebb6287b34d0bca3cb06796e01183562ed.zip
Improved support for bluray discs.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 32381684a2eecaaa43616d5bc8ab51780d42e336)
Diffstat (limited to 'tdeioslave/media/mediamanager/halbackend.cpp')
-rw-r--r--tdeioslave/media/mediamanager/halbackend.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/tdeioslave/media/mediamanager/halbackend.cpp b/tdeioslave/media/mediamanager/halbackend.cpp
index 637b16bf0..37099cc84 100644
--- a/tdeioslave/media/mediamanager/halbackend.cpp
+++ b/tdeioslave/media/mediamanager/halbackend.cpp
@@ -571,24 +571,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_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_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_SUFFIX;
+ }
+ }
if (libhal_volume_disc_has_audio(halVolume) && !libhal_volume_disc_has_data(halVolume))
{
@@ -599,13 +620,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";
}