changeset 1531:10cfa5b51bce

xspf: Store playlist title when saving playlist
author Kieran Clancy <clancy.kieran+audacious@gmail.com>
date Mon, 27 Aug 2007 01:59:23 +0930
parents f0cbcd84528e
children 2e4bafa36206
files src/xspf/xspf.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xspf/xspf.c	Sun Aug 26 15:27:31 2007 +0200
+++ b/src/xspf/xspf.c	Mon Aug 27 01:59:23 2007 +0930
@@ -460,6 +460,15 @@
         xmlAddChild(rootnode, extension);
     }
 
+    /* save playlist title */
+    if(playlist->title && playlist->title[0]
+            && g_utf8_validate(playlist->title, -1, NULL)) {
+        xmlNodePtr title;
+        title = xmlNewNode(NULL, (xmlChar *)"title");
+        xmlAddChild(title, xmlNewText((xmlChar *)playlist->title));
+        xmlAddChild(rootnode, title);
+    }
+
     tracklist = xmlNewNode(NULL, (xmlChar *)"trackList");
     xmlAddChild(rootnode, tracklist);