# HG changeset patch # User Matti Hamalainen # Date 1188948160 -10800 # Node ID 78d8dd386d0b360c33522d1b700180d227e47109 # Parent f2f0ea5b58760277ce42a599c016d16b17de9726 Kludge xspf plugin to "work" better with playlist entries which have characters requiring encoding. This is not a real fix, though. diff -r f2f0ea5b5876 -r 78d8dd386d0b src/xspf/xspf.c --- a/src/xspf/xspf.c Wed Sep 05 02:11:41 2007 +0300 +++ b/src/xspf/xspf.c Wed Sep 05 02:22:40 2007 +0300 @@ -112,16 +112,16 @@ if(nptr->type == XML_ELEMENT_NODE && !xmlStrcmp(nptr->name, (xmlChar *)"location")) { gchar *str = (gchar *)xmlNodeGetContent(nptr); - gchar *tmp = NULL; - // tmp is escaped uri or a part of escaped uri. - tmp = g_strdup_printf("%s%s", base ? base : "", str); - location = g_filename_from_uri(tmp, NULL, NULL); - if(!location) // http:// or something. - location = g_strdup(tmp); - - xmlFree(str); str = NULL; - g_free(tmp); tmp = NULL; + location = g_strdup_printf("%s%s", base ? base : "", str); + xmlFree(str); + str = g_filename_from_uri(location, NULL, NULL); + if (str) { + g_free(location); + location = g_strdup_printf("file://%s", str); + } + + g_free(str); } else if(nptr->type == XML_ELEMENT_NODE && !xmlStrcmp(nptr->name, (xmlChar *)"title")) {