[vlc-devel] commit: skins2: save the playlist also in html. ( Rémi Duraffort )
git version control
git at videolan.org
Sat Jan 24 12:59:11 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jan 24 12:49:05 2009 +0100| [c0f36651a1fbd340f413d88ddea7da533d244b5e] | committer: Rémi Duraffort
skins2: save the playlist also in html.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0f36651a1fbd340f413d88ddea7da533d244b5e
---
modules/gui/skins2/commands/cmd_playlist.cpp | 13 +++++++++----
modules/gui/skins2/src/dialogs.cpp | 4 +++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/modules/gui/skins2/commands/cmd_playlist.cpp b/modules/gui/skins2/commands/cmd_playlist.cpp
index ec2118a..0e658a0 100644
--- a/modules/gui/skins2/commands/cmd_playlist.cpp
+++ b/modules/gui/skins2/commands/cmd_playlist.cpp
@@ -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 );
}
}
diff --git a/modules/gui/skins2/src/dialogs.cpp b/modules/gui/skins2/src/dialogs.cpp
index 57eb2af..27cd7a7 100644
--- a/modules/gui/skins2/src/dialogs.cpp
+++ b/modules/gui/skins2/src/dialogs.cpp
@@ -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 );
}
More information about the vlc-devel
mailing list