changeset 647:f684905cf688 trunk

[svn] - add mms:// as a streaming scheme.
author yaz
date Tue, 13 Feb 2007 22:58:09 -0800
parents ede814584df9
children 0eca44731221
files ChangeLog src/xspf/xspf.c
diffstat 2 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Feb 13 22:54:57 2007 -0800
+++ b/ChangeLog	Tue Feb 13 22:58:09 2007 -0800
@@ -1,3 +1,11 @@
+2007-02-14 06:54:57 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1378]
+  - screening by extension had not worked.
+  
+  trunk/src/madplug/plugin.c |    8 +++++---
+  1 file changed, 5 insertions(+), 3 deletions(-)
+
+
 2007-02-14 06:10:05 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1376]
   - revise input_id3_get_string().
--- a/src/xspf/xspf.c	Tue Feb 13 22:54:57 2007 -0800
+++ b/src/xspf/xspf.c	Tue Feb 13 22:58:09 2007 -0800
@@ -278,18 +278,21 @@
 		track = xmlNewNode(NULL, (xmlChar *)"track");
 		location = xmlNewNode(NULL, (xmlChar *)"location");
 
-		/* url encode file name. exclude streaming for now. */
-		if (strncasecmp("http://", entry->filename, 7) &&
-		    strncasecmp("https://", entry->filename, 8)) { /* the rest */
+		/* uri escape entry->filename */
+		if ( !strncasecmp("http://", entry->filename, 7)  ||
+		     !strncasecmp("https://", entry->filename, 8) ||
+		     !strncasecmp("mms://", entry->filename, 6) ) /* streaming */
+		{
+			gchar *tmp = (gchar *)xmlURIEscape((xmlChar *)entry->filename);
+			filename = g_strdup(tmp ? tmp : entry->filename);
+			g_free(tmp);
+		}
+		else /* local file */
+		{
 			gchar *tmp = (gchar *)xmlPathToURI((const xmlChar *)entry->filename);
 			filename = g_strdup_printf("file://%s", tmp);
 			g_free(tmp);
 		}
-		else { /* streaming */
-			gchar *tmp = (gchar *)xmlURIEscape((xmlChar *)entry->filename);
-			filename = g_strdup(tmp ? tmp : entry->filename);
-			g_free(tmp);
-		}
 
 		if(!g_utf8_validate(filename, -1, NULL))
 			continue;