# HG changeset patch # User Kieran Clancy # Date 1188128565 -34200 # Node ID 8fddba1d94e4d16ad89bb65eabd109aa3d5d753f # Parent 8a53b54fc0815aaefee66feea4247622ee44da84 xspf: When loading playlist, read title from xml if set diff -r 8a53b54fc081 -r 8fddba1d94e4 src/xspf/xspf.c --- a/src/xspf/xspf.c Sat Aug 25 20:22:42 2007 -0500 +++ b/src/xspf/xspf.c Sun Aug 26 21:12:45 2007 +0930 @@ -322,6 +322,18 @@ } if(nptr2->type == XML_ELEMENT_NODE + && !xmlStrcmp(nptr2->name, (xmlChar *)"title")) { + Playlist *plist = playlist_get_active(); + xmlChar *title = xmlNodeGetContent(nptr2); + if (title && *title) { + gchar *old = plist->title; + plist->title = g_strdup((gchar*)title); + if(old) g_free(old); + } + xmlFree(title); + } + + if(nptr2->type == XML_ELEMENT_NODE && !xmlStrcmp(nptr2->name, (xmlChar *)"trackList")) { find_track(nptr2, filename, pos); }