]> git.sesse.net Git - vlc/commitdiff
skins2(Windows): add a command to start the first playlist item
authorErwan Tulou <erwan10@videolan.org>
Sat, 27 Jun 2009 21:25:20 +0000 (23:25 +0200)
committerErwan Tulou <erwan10@videolan.org>
Sun, 28 Jun 2009 19:40:01 +0000 (21:40 +0200)
modules/gui/skins2/commands/cmd_playlist.cpp
modules/gui/skins2/commands/cmd_playlist.hpp

index 0e658a07f0f50ae89ecc18647e347fcd288cc465..34f50f9ec3999d68619b7b47f8296eb987a04e4d 100644 (file)
@@ -120,3 +120,12 @@ void CmdPlaylistSave::execute()
         playlist_Export( pPlaylist, m_file.c_str(), pPlaylist->p_local_category, psz_module );
     }
 }
+
+void CmdPlaylistFirst::execute()
+{
+    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+
+    playlist_Lock( pPlaylist );
+    playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Locked );
+    playlist_Unlock( pPlaylist );
+}
index bd7e630e224e1fe862bb4f028384c73f248a47db..4ea393ff5a90c08f9d62d422f5017c4d8d74a206 100644 (file)
@@ -58,6 +58,9 @@ DEFINE_COMMAND( PlaylistNext, "playlist next" )
 /// Command to jump to the previous item
 DEFINE_COMMAND( PlaylistPrevious, "playlist previous" )
 
+/// Command to start the playlist
+DEFINE_COMMAND( PlaylistFirst, "playlist first" )
+
 
 /// Command to set the random state
 class CmdPlaylistRandom: public CmdGeneric