]> git.sesse.net Git - vlc/commitdiff
* xspf.c: export item description as <annotation>
authorYoann Peronneau <yoann@videolan.org>
Sun, 20 May 2007 17:23:28 +0000 (17:23 +0000)
committerYoann Peronneau <yoann@videolan.org>
Sun, 20 May 2007 17:23:28 +0000 (17:23 +0000)
modules/misc/playlist/xspf.c

index 01b167eef50fe57e794f9c77ef3813a699938d1a..48a12ec238fc1966ea3e79e6a787b515ac5317d2 100644 (file)
@@ -210,6 +210,18 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file,
         free( psz );
     }
 
+    /* -> the description */
+    psz = p_item->p_input->p_meta->psz_description ?
+                        strdup( p_item->p_input->p_meta->psz_description ):
+                        strdup( "" );
+    psz_temp = convert_xml_special_chars( psz );
+    if( psz ) free( psz );
+    if( *psz_temp )
+    {
+        fprintf( p_file, "\t\t\t<annotation>%s</annotation>\n", psz_temp );
+    }
+    free( psz_temp );
+
 xspfexportitem_end:
     /* -> the duration */
     if( p_item->p_input->i_duration > 0 )