totem-pl-parser r261 - in branches/gnome-2-24: . plparse
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem-pl-parser r261 - in branches/gnome-2-24: . plparse
- Date: Fri, 5 Dec 2008 14:34:25 +0000 (UTC)
Author: hadess
Date: Fri Dec 5 14:34:24 2008
New Revision: 261
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=261&view=rev
Log:
2008-12-05 Bastien Nocera <hadess hadess net>
* plparse/totem-disc.c (cd_cache_disc_is_cdda),
(cd_cache_disc_is_vcd), (cd_cache_disc_is_dvd),
(totem_cd_detect_type_with_url): Don't error out
if a device doesn't have the needed HAL properties
to be of a certain type, return a URL for data
discs when we're asked for one, not a local file path
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/plparse/totem-disc.c
Modified: branches/gnome-2-24/plparse/totem-disc.c
==============================================================================
--- branches/gnome-2-24/plparse/totem-disc.c (original)
+++ branches/gnome-2-24/plparse/totem-disc.c Fri Dec 5 14:34:24 2008
@@ -548,6 +548,10 @@
DBusError error;
dbus_bool_t is_cdda;
+ if (libhal_device_property_exists (cache->ctx,
+ cache->disc_udi, "volume.disc.has_audio", NULL) == FALSE)
+ return MEDIA_TYPE_DATA;
+
dbus_error_init (&error);
is_cdda = libhal_device_get_property_bool (cache->ctx,
@@ -649,19 +653,26 @@
DBusError error;
dbus_bool_t is_vcd;
- dbus_error_init (&error);
-
- is_vcd = libhal_device_get_property_bool (cache->ctx,
- cache->disc_udi, "volume.disc.is_vcd", &error);
-
- if (dbus_error_is_set (&error)) {
- g_warning ("Error checking whether the volume is a VCD: %s",
- error.message);
- dbus_error_free (&error);
- return MEDIA_TYPE_ERROR;
+ if (libhal_device_property_exists (cache->ctx,
+ cache->disc_udi, "volume.disc.is_vcd", NULL) != FALSE) {
+ dbus_error_init (&error);
+
+ is_vcd = libhal_device_get_property_bool (cache->ctx,
+ cache->disc_udi, "volume.disc.is_vcd", &error);
+
+ if (dbus_error_is_set (&error)) {
+ g_warning ("Error checking whether the volume is a VCD: %s",
+ error.message);
+ dbus_error_free (&error);
+ return MEDIA_TYPE_ERROR;
+ }
+ if (is_vcd != FALSE)
+ return MEDIA_TYPE_VCD;
}
- if (is_vcd != FALSE)
- return MEDIA_TYPE_VCD;
+ if (libhal_device_property_exists (cache->ctx,
+ cache->disc_udi, "volume.disc.is_svcd", NULL) == FALSE)
+ return MEDIA_TYPE_DATA;
+
is_vcd = libhal_device_get_property_bool (cache->ctx,
cache->disc_udi, "volume.disc.is_svcd", &error);
@@ -698,6 +709,10 @@
DBusError error;
dbus_bool_t is_dvd;
+ if (libhal_device_property_exists (cache->ctx,
+ cache->disc_udi, "volume.disc.is_videodvd", NULL) == FALSE)
+ return MEDIA_TYPE_DATA;
+
dbus_error_init (&error);
is_dvd = libhal_device_get_property_bool (cache->ctx,
@@ -906,7 +921,7 @@
type = MEDIA_TYPE_ERROR;
/* No error, it's just not usable */
} else {
- *url = g_strdup (cache->mountpoint);
+ *url = g_filename_to_uri (cache->mountpoint, NULL, NULL);
}
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]