ChangeToNode( p_playlist, p_item_in_one );
else
{
+ playlist_item_t *p_status_item = get_current_status_item( p_playlist );
+ playlist_item_t *p_status_node = get_current_status_node( p_playlist );
+ if( p_item_in_one == p_status_item )
+ {
+ /* We're deleting the current playlist item. Update
+ * the playlist object to point at the previous item
+ * so the playlist won't be restarted */
+ playlist_item_t *p_prev_status_item = NULL;
+ int i = 0;
+ while( i < p_status_node->i_children &&
+ p_status_node->pp_children[i] != p_status_item )
+ {
+ p_prev_status_item = p_status_node->pp_children[i];
+ i++;
+ }
+ if( i == p_status_node->i_children )
+ p_prev_status_item = NULL;
+ if( p_prev_status_item )
+ set_current_status_item( p_playlist, p_prev_status_item );
+ }
DeleteFromInput( p_playlist, p_item_in_one->p_input->i_id,
p_playlist->p_root_onelevel, false );
}