xspf export: write the extension tag before the trackList, we'll need to read it...
authorRafaël Carré <funman@videolan.org>
Mon, 12 Nov 2007 20:10:54 +0000 (20:10 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 12 Nov 2007 20:10:54 +0000 (20:10 +0000)
modules/misc/playlist/xspf.c

index d2bbc8e..0f97da8 100644 (file)
@@ -73,16 +73,6 @@ int E_(xspf_export_playlist)( vlc_object_t *p_this )
         free( psz_temp );
     }
 
-    /* export all items in a flat format */
-    fprintf( p_export->p_file, "\t<trackList>\n" );
-    i_count = 0;
-    for( i = 0; i < p_node->i_children; i++ )
-    {
-        xspf_export_item( p_node->pp_children[i], p_export->p_file,
-                          &i_count );
-    }
-    fprintf( p_export->p_file, "\t</trackList>\n" );
-
     /* export the tree structure in <extension> */
     fprintf( p_export->p_file, "\t<extension application=\"http://www.videolan.org/vlc/playlist/0\">\n" );
     i_count = 0;
@@ -93,6 +83,16 @@ int E_(xspf_export_playlist)( vlc_object_t *p_this )
     }
     fprintf( p_export->p_file, "\t</extension>\n" );
 
+    /* export all items in a flat format */
+    fprintf( p_export->p_file, "\t<trackList>\n" );
+    i_count = 0;
+    for( i = 0; i < p_node->i_children; i++ )
+    {
+        xspf_export_item( p_node->pp_children[i], p_export->p_file,
+                          &i_count );
+    }
+    fprintf( p_export->p_file, "\t</trackList>\n" );
+
     /* close the header elements */
     fprintf( p_export->p_file, "</playlist>\n" );