[totem-pl-parser] When asking for a URI, give back a URI



commit 0e1ba4bf1e37e669ac5144a381cc0cf61d1620e4
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 2 18:21:53 2009 +0100

    When asking for a URI, give back a URI
    
    We ask for a URI, and ended up getting a local path for the
    mountpoint. Fixes playing data mounts from Totem's Movie menu.

 plparse/totem-disc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plparse/totem-disc.c b/plparse/totem-disc.c
index dc63625..683bc28 100644
--- a/plparse/totem-disc.c
+++ b/plparse/totem-disc.c
@@ -812,7 +812,9 @@ totem_cd_detect_type_with_url (const char *device,
       type = MEDIA_TYPE_ERROR;
       /* No error, it's just not usable */
     } else {
-      *mrl = g_strdup (cache->mountpoint);
+      *mrl = g_filename_to_uri (cache->mountpoint, NULL, NULL);
+      if (*mrl == NULL)
+	*mrl = g_strdup (cache->mountpoint);
     }
     break;
   default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]