+ if( p_root->i_children == -1 ) {
+ ARRAY_BSEARCH( p_playlist->items,->i_id, int, p_root->i_id, i );
+ if( i != -1 )
+ ARRAY_REMOVE( p_playlist->items, i );
+ }
+
+ /* Check if it is the current item */
+ if( get_current_status_item( p_playlist ) == p_root )
+ {
+ /* Stop */
+ playlist_Control( p_playlist, PLAYLIST_STOP, pl_Locked );
+ msg_Info( p_playlist, "stopping playback" );
+ /* This item can't be the next one to be played ! */
+ set_current_status_item( p_playlist, NULL );
+ }
+
+ ARRAY_BSEARCH( p_playlist->current,->i_id, int, p_root->i_id, i );
+ if( i != -1 )
+ ARRAY_REMOVE( p_playlist->current, i );
+
+ PL_DEBUG( "deleting item `%s'", p_root->p_input->psz_name );
+