Index: sources/rb-playlist-source.c
===================================================================
--- sources/rb-playlist-source.c	(revision 5700)
+++ sources/rb-playlist-source.c	(working copy)
@@ -55,6 +55,8 @@
 #include "rb-static-playlist-source.h"
 #include "rb-auto-playlist-source.h"
 
+#include "rb-playlist-manager.h"
+
 /**
  * SECTION:rb-playlist-source
  * @short_description: Base class for playlist sources
@@ -593,11 +595,12 @@
 void
 rb_playlist_source_save_playlist (RBPlaylistSource *source,
 				  const char *uri,
-				  gboolean m3u_format)
+				  gint format)
 {
 	TotemPlParser *playlist;
 	GError *error = NULL;
 	char *name;
+	gint format_number;
 
 	g_return_if_fail (RB_IS_PLAYLIST_SOURCE (source));
 
@@ -606,9 +609,23 @@
 
 	g_object_get (source, "name", &name, NULL);
 
+	switch(format) {
+	case RB_PLAYLIST_EXPORT_TYPE_XSPF:
+		format_number = TOTEM_PL_PARSER_XSPF;
+		break;
+	case RB_PLAYLIST_EXPORT_TYPE_M3U:
+		format_number = TOTEM_PL_PARSER_M3U;
+		break;
+	case RB_PLAYLIST_EXPORT_TYPE_PLS:
+		format_number = TOTEM_PL_PARSER_PLS;
+		break;
+	default:
+		format_number = TOTEM_PL_PARSER_IRIVER_PLA;
+		break;
+	};
 	totem_pl_parser_write_with_title (playlist, GTK_TREE_MODEL (source->priv->model),
 					  playlist_iter_func, uri, name,
-					  m3u_format ? TOTEM_PL_PARSER_M3U : TOTEM_PL_PARSER_PLS,
+					  format_number,
 					  NULL, &error);
 	g_object_unref (playlist);
 	g_free (name);
Index: sources/rb-playlist-source.h
===================================================================
--- sources/rb-playlist-source.h	(revision 5700)
+++ sources/rb-playlist-source.h	(working copy)
@@ -76,7 +76,7 @@
 
 void		rb_playlist_source_save_playlist(RBPlaylistSource *source,
 						 const char *uri,
-						 gboolean m3u_format);
+						 gint format);
 
 void		rb_playlist_source_save_to_xml	(RBPlaylistSource *source,
 						 xmlNodePtr parent_node);
Index: shell/rb-playlist-manager.c
===================================================================
--- shell/rb-playlist-manager.c	(revision 5700)
+++ shell/rb-playlist-manager.c	(working copy)
@@ -1331,12 +1331,16 @@
   const RBPlaylistExportType type;
 } RBPlaylistExportFilter;
 
+static const char *xspf_extensions [] = {"xspf", NULL};
 static const char *m3u_extensions [] = {"m3u", NULL};
 static const char *pls_extensions [] = {"pls", NULL};
+static const char *pla_extensions [] = {"pla", NULL};
 
 static RBPlaylistExportFilter playlist_export_formats[] = {
+	{N_("XML Shareable Playlist Format"), xspf_extensions, RB_PLAYLIST_EXPORT_TYPE_XSPF},
 	{N_("MPEG Version 3.0 URL"), m3u_extensions, RB_PLAYLIST_EXPORT_TYPE_M3U},
 	{N_("Shoutcast playlist"), pls_extensions, RB_PLAYLIST_EXPORT_TYPE_PLS},
+	{N_("iRiver Playlist"), pla_extensions, RB_PLAYLIST_EXPORT_TYPE_PLA},
 };
 
 static void
@@ -1384,7 +1388,7 @@
 			rb_error_dialog (NULL, _("Couldn't save playlist"), _("Unsupported file extension given."));
 	} else {
 		rb_playlist_source_save_playlist (RB_PLAYLIST_SOURCE (mgr->priv->selected_source),
-						  file, (export_type == RB_PLAYLIST_EXPORT_TYPE_M3U));
+						  file, export_type);
 		gtk_widget_destroy (GTK_WIDGET (dialog));
 	}
 
@@ -1806,7 +1810,7 @@
 rb_playlist_manager_export_playlist (RBPlaylistManager *mgr,
 				     const gchar *playlist,
 				     const gchar *uri,
-				     gboolean m3u_format,
+				     gint format,
 				     GError **error)
 {
 	RBSource *source = _get_playlist_by_name (mgr, playlist);
@@ -1821,6 +1825,6 @@
 
 	rb_playlist_source_save_playlist (RB_PLAYLIST_SOURCE (source),
 					  uri,
-					  m3u_format);
+					  format);
 	return TRUE;
 }
Index: shell/rb-playlist-manager.h
===================================================================
--- shell/rb-playlist-manager.h	(revision 5700)
+++ shell/rb-playlist-manager.h	(working copy)
@@ -77,8 +77,10 @@
 typedef enum
 {
 	RB_PLAYLIST_EXPORT_TYPE_UNKNOWN,
+	RB_PLAYLIST_EXPORT_TYPE_XSPF,
 	RB_PLAYLIST_EXPORT_TYPE_M3U,
 	RB_PLAYLIST_EXPORT_TYPE_PLS,
+	RB_PLAYLIST_EXPORT_TYPE_PLA,
 } RBPlaylistExportType;
 
 GType			rb_playlist_manager_get_type	(void);
@@ -125,7 +127,7 @@
 gboolean		rb_playlist_manager_export_playlist (RBPlaylistManager *mgr,
 							     const gchar *name,
 							     const gchar *uri,
-							     gboolean m3u_format,
+							     gint format,
 							     GError **error);
 
 G_END_DECLS
Index: shell/rb-playlist-manager.xml
===================================================================
--- shell/rb-playlist-manager.xml	(revision 5700)
+++ shell/rb-playlist-manager.xml	(working copy)
@@ -30,7 +30,7 @@
     <method name="exportPlaylist">
       <arg type="s" name="playlist"/>
       <arg type="s" name="uri"/>
-      <arg type="b" name="m3u_format"/>
+      <arg type="i" name="format"/>
     </method>
 
     <method name="importPlaylist">
