- /* 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 );
- }
+ int i;
+ var_SetInteger( p_playlist, "playlist-item-deleted", p_root->i_id );
+ ARRAY_BSEARCH( p_playlist->all_items, ->i_id, int, p_root->i_id, i );
+ if( i != -1 )
+ ARRAY_REMOVE( p_playlist->all_items, i );