Commit 03098679 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: inline playlist_DeleteItem

parent 2c5e709f
......@@ -110,7 +110,7 @@ static void input_item_add_subitem_tree ( const vlc_event_t * p_event,
}
assert( i < p_parent->i_children );
playlist_DeleteItem( p_playlist, p_item, true );
playlist_NodeDelete( p_playlist, p_item, true, false );
/* If there is a pending request referring to the item we just deleted
* it needs to be updated so that we do not try to play an entity that
......@@ -337,7 +337,7 @@ static int DeleteFromInput( playlist_t *p_playlist, input_item_t *p_input,
playlist_item_t *p_item = playlist_ItemFindFromInputAndRoot(
p_playlist, p_input, p_root, false );
if( !p_item ) return VLC_EGENERIC;
return playlist_DeleteItem( p_playlist, p_item, b_do_stop );
return playlist_NodeDelete( p_playlist, p_item, true, false );
}
/**
......@@ -409,7 +409,7 @@ int playlist_DeleteFromItemId( playlist_t *p_playlist, int i_id )
PL_ASSERT_LOCKED;
playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id );
if( !p_item ) return VLC_EGENERIC;
return playlist_DeleteItem( p_playlist, p_item, true );
return playlist_NodeDelete( p_playlist, p_item, true, false );
}
/***************************************************************************
......@@ -859,14 +859,6 @@ static void ChangeToNode( playlist_t *p_playlist, playlist_item_t *p_item )
ARRAY_REMOVE( p_playlist->items, i );
}
/* Do the actual removal */
int playlist_DeleteItem( playlist_t * p_playlist, playlist_item_t *p_item,
bool b_stop )
{
assert( b_stop );
return playlist_NodeDelete( p_playlist, p_item, true, false );
}
static int RecursiveAddIntoParent (
playlist_t *p_playlist, playlist_item_t *p_parent,
input_item_node_t *p_node, int i_pos, bool b_flat,
......
......@@ -138,7 +138,6 @@ int playlist_DeleteFromItemId( playlist_t*, int );
int playlist_ItemRelease( playlist_item_t * );
int playlist_NodeEmpty( playlist_t *, playlist_item_t *, bool );
int playlist_DeleteItem( playlist_t * p_playlist, playlist_item_t *, bool);
void ResetCurrentlyPlaying( playlist_t *p_playlist, playlist_item_t *p_cur );
void ResyncCurrentIndex( playlist_t *p_playlist, playlist_item_t *p_cur );
......
......@@ -206,7 +206,7 @@ static void playlist_sd_item_removed(services_discovery_t *sd,
/* if the item was added under a category and the category node
becomes empty, delete that node as well */
if( p_parent->i_children > 1 || p_parent == p_sd_node )
playlist_DeleteItem( p_playlist, p_item, true );
playlist_NodeDelete( p_playlist, p_item, true, false );
else
playlist_NodeDelete( p_playlist, p_parent, true, true );
PL_UNLOCK;
......
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