Commit 6d28f6de authored by Rémi Duraffort's avatar Rémi Duraffort

Fix #2720: when deleting the current playing item we must ask the playlist to

reset the current status item.
parent 7e1f14b9
...@@ -899,11 +899,17 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item, ...@@ -899,11 +899,17 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
ARRAY_REMOVE( p_playlist->items, i ); ARRAY_REMOVE( p_playlist->items, i );
/* Check if it is the current item */ /* Check if it is the current item */
if( get_current_status_item( p_playlist ) == p_item && b_stop ) if( get_current_status_item( p_playlist ) == p_item )
{
/* Stop it if we have to */
if( b_stop )
{ {
playlist_Control( p_playlist, PLAYLIST_STOP, pl_Locked ); playlist_Control( p_playlist, PLAYLIST_STOP, pl_Locked );
msg_Info( p_playlist, "stopping playback" ); msg_Info( p_playlist, "stopping playback" );
} }
/* In any case, this item can't be the next one to be played ! */
set_current_status_item( p_playlist, NULL );
}
PL_DEBUG( "deleting item `%s'", p_item->p_input->psz_name ); PL_DEBUG( "deleting item `%s'", p_item->p_input->psz_name );
......
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