changeset 657:f46c9abe09d4 trunk

[svn] - do not unescape streaming uri.
author yaz
date Thu, 15 Feb 2007 19:28:20 -0800
parents 3d734efe82d0
children a9199ee8e5c0
files ChangeLog src/xspf/xspf.c
diffstat 2 files changed, 22 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 15 19:04:53 2007 -0800
+++ b/ChangeLog	Thu Feb 15 19:28:20 2007 -0800
@@ -1,3 +1,11 @@
+2007-02-16 03:04:53 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1398]
+  - disable debugging in preparation for alpha5 release
+  
+  trunk/src/madplug/plugin.h |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-02-16 01:04:00 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1396]
   - fix double free bug in vorbis fileinfo.
--- a/src/xspf/xspf.c	Thu Feb 15 19:04:53 2007 -0800
+++ b/src/xspf/xspf.c	Thu Feb 15 19:28:20 2007 -0800
@@ -86,14 +86,22 @@
 
 	tuple = bmp_title_input_new();
 
-    // staticlist hack
-    tuple->mtime = -1; // mark as uninitialized.
+	// staticlist hack
+	tuple->mtime = -1; // mark as uninitialized.
 
 	// creator, album, title, duration, trackNum, annotation, image, 
 	for(nptr = track->children; nptr != NULL; nptr = nptr->next){
 		if(nptr->type == XML_ELEMENT_NODE && !xmlStrcmp(nptr->name, (xmlChar *)"location")){
 			gchar *str = (gchar *)xmlNodeGetContent(nptr);
-			gchar *tmp = (gchar *)xmlURIUnescapeString(str, -1, NULL);
+			gchar *tmp;
+
+			if( strncmp(str, "http://", 7) && strncmp(str, "https://", 8) && 
+			    strncmp(str, "mms://", 6) ) { /* not a streaming */
+				tmp = (gchar *)xmlURIUnescapeString(str, -1, NULL); 
+			}
+			else { /* streaming */
+				tmp = g_strdup(str);
+			}
 
 			if(strstr(tmp, "file://")){
 				location = g_strdup_printf("%s%s", base ? base : "", tmp+7);
@@ -172,9 +180,9 @@
 		tuple->length = -1;
 	}
 
-    if(override_mtime) {
-        tuple->mtime = 0; //when mtime=0, scanning will be skipped.  --yaz
-    }
+	if(override_mtime) {
+		tuple->mtime = 0; //when mtime=0, scanning will be skipped.  --yaz
+	}
 
 	if(location){
 		tuple->file_name = g_path_get_basename(location);