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 0e658a0..34f50f9 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 bd7e630..4ea393f 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