]> git.sesse.net Git - vlc/commitdiff
skins2: save the playlist also in html.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 24 Jan 2009 11:49:05 +0000 (12:49 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 24 Jan 2009 11:50:08 +0000 (12:50 +0100)
modules/gui/skins2/commands/cmd_playlist.cpp
modules/gui/skins2/src/dialogs.cpp

index ec2118a550664b84b0625531702c4c4c6926f1df..0e658a07f0f50ae89ecc18647e347fcd288cc465 100644 (file)
@@ -102,16 +102,21 @@ void CmdPlaylistSave::execute()
     if( pPlaylist != NULL )
     {
         static const char psz_xspf[] = "export-xspf",
-                          psz_m3u[] = "export-m3u";
+                          psz_m3u[] = "export-m3u",
+                          psz_html[] = "export-html";
         const char *psz_module;
         if( m_file.find( ".xsp", 0 ) != string::npos )
             psz_module = psz_xspf;
+        else if( m_file.find( "m3u", 0 ) != string::npos )
+            psz_module = psz_m3u;
+        else if( m_file.find( "html", 0 ) != string::npos )
+            psz_module = psz_html;
         else
         {
-            psz_module = psz_m3u;
-            if( m_file.find( ".m3u", 0 ) == string::npos )
-                m_file.append( ".m3u" );
+            msg_Err( getIntf(), "Impossible to recognise the file type" );
+            return;
         }
+
         playlist_Export( pPlaylist, m_file.c_str(), pPlaylist->p_local_category, psz_module );
     }
 }
index 57eb2af06352c9608902e0cfd32c32f8ea7b26f2..27cd7a7506003a853b9984eadc091776c8467501 100644 (file)
@@ -233,7 +233,9 @@ void Dialogs::showPlaylistLoad()
 
 void Dialogs::showPlaylistSave()
 {
-    showFileGeneric( _("Save playlist"), _("XSPF playlist|*.xspf|M3U file|*.m3u"),
+    showFileGeneric( _("Save playlist"), _("XSPF playlist|*.xspf|"
+                                           "M3U file|*.m3u|"
+                                           "HTML playlist|*.html"),
                      showPlaylistSaveCB, kSAVE );
 }