Commit 91e6499b authored by Rémi Duraffort's avatar Rémi Duraffort

skins2: factorize.

parent 208aeca0
...@@ -56,11 +56,7 @@ void CmdPlaylistRandom::execute() ...@@ -56,11 +56,7 @@ void CmdPlaylistRandom::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{ var_SetBool( pPlaylist , "random", m_value );
vlc_value_t val;
val.b_bool = m_value;
var_Set( pPlaylist , "random", val);
}
} }
...@@ -68,11 +64,7 @@ void CmdPlaylistLoop::execute() ...@@ -68,11 +64,7 @@ void CmdPlaylistLoop::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{ var_SetBool( pPlaylist , "loop", m_value );
vlc_value_t val;
val.b_bool = m_value;
var_Set( pPlaylist , "loop", val);
}
} }
...@@ -80,11 +72,7 @@ void CmdPlaylistRepeat::execute() ...@@ -80,11 +72,7 @@ void CmdPlaylistRepeat::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{ var_SetBool( pPlaylist , "repeat", m_value );
vlc_value_t val;
val.b_bool = m_value;
var_Set( pPlaylist , "repeat", val);
}
} }
...@@ -125,7 +113,5 @@ void CmdPlaylistFirst::execute() ...@@ -125,7 +113,5 @@ void CmdPlaylistFirst::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
playlist_Lock( pPlaylist ); playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Unlocked );
playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Locked );
playlist_Unlock( pPlaylist );
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment