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

playlist: remove constant playlist_NodeDelete() parameter

parent a71f611f
......@@ -353,7 +353,7 @@ VLC_API int playlist_LiveSearchUpdate(playlist_t *, playlist_item_t *, const cha
/* Node management */
VLC_API playlist_item_t * playlist_NodeCreate( playlist_t *, const char *, playlist_item_t * p_parent, int i_pos, int i_flags, input_item_t * );
VLC_API playlist_item_t * playlist_ChildSearchName(playlist_item_t*, const char* ) VLC_USED;
VLC_API void playlist_NodeDelete( playlist_t *, playlist_item_t *, bool , bool );
VLC_API void playlist_NodeDelete( playlist_t *, playlist_item_t *, bool );
/**************************
* Audio output management
......
......@@ -267,7 +267,7 @@ DBUS_METHOD( RemoveTrack )
if( item->i_id == i_id )
{
playlist_NodeDelete( p_playlist, item, true, false );
playlist_NodeDelete( p_playlist, item, false );
break;
}
}
......
......@@ -1345,7 +1345,7 @@ static bool HandlePlaylistKey(intf_thread_t *intf, int key)
if (item->i_children == -1)
playlist_DeleteFromInput(p_playlist, item->p_input, pl_Locked);
else
playlist_NodeDelete(p_playlist, item, true , false);
playlist_NodeDelete(p_playlist, item, false);
PL_UNLOCK;
vlc_mutex_lock(&sys->pl_lock);
if (sys->box_idx >= sys->box_lines_total - 1)
......
......@@ -682,7 +682,7 @@ void DialogsProvider::saveRecentsToPlaylist()
saveAPlaylist(THEPL, p_node_recents);
playlist_Lock(THEPL);
playlist_NodeDelete(THEPL, p_node_recents, true, false);
playlist_NodeDelete(THEPL, p_node_recents, false);
playlist_Unlock(THEPL);
}
......
......@@ -66,7 +66,7 @@ void Playtree::delSelected()
}
else
{
playlist_NodeDelete( m_pPlaylist, pItem, true, false );
playlist_NodeDelete( m_pPlaylist, pItem, false );
}
}
playlist_Unlock( m_pPlaylist );
......
......@@ -110,7 +110,7 @@ static void input_item_add_subitem_tree ( const vlc_event_t * p_event,
}
assert( i < p_parent->i_children );
playlist_NodeDelete( p_playlist, p_item, true, false );
playlist_NodeDelete( p_playlist, p_item, 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
......@@ -329,7 +329,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;
playlist_NodeDelete( p_playlist, p_item, true, false );
playlist_NodeDelete( p_playlist, p_item, false );
return VLC_SUCCESS;
}
......@@ -401,7 +401,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;
playlist_NodeDelete( p_playlist, p_item, true, false );
playlist_NodeDelete( p_playlist, p_item, false );
return VLC_SUCCESS;
}
......
......@@ -206,9 +206,9 @@ 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_NodeDelete( p_playlist, p_item, true, false );
playlist_NodeDelete( p_playlist, p_item, false );
else
playlist_NodeDelete( p_playlist, p_parent, true, true );
playlist_NodeDelete( p_playlist, p_parent, true );
PL_UNLOCK;
}
......@@ -259,7 +259,7 @@ static void playlist_ServicesDiscoveryInternalRemove(playlist_t *playlist,
/* Remove the sd playlist node if it exists */
playlist_Lock(playlist);
if (sds->node != NULL)
playlist_NodeDelete(playlist, sds->node, true, false);
playlist_NodeDelete(playlist, sds->node, false);
playlist_Unlock(playlist);
free(sds);
......
......@@ -109,8 +109,7 @@ void playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root )
{
if( p_root->pp_children[i]->i_children > -1 )
{
playlist_NodeDelete( p_playlist, p_root->pp_children[i],
true, false );
playlist_NodeDelete( p_playlist, p_root->pp_children[i], false );
}
else
{
......@@ -126,18 +125,16 @@ void playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root )
*
* \param p_playlist the playlist
* \param p_root the node
* \param b_delete_items do we have to delete the children items ?
*/
void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
bool b_delete_items, bool b_force )
bool b_force )
{
PL_ASSERT_LOCKED;
/* Delete the children */
for( int i = p_root->i_children - 1 ; i >= 0; i-- )
if( b_delete_items || p_root->pp_children[i]->i_children >= 0 )
playlist_NodeDelete( p_playlist, p_root->pp_children[i],
b_delete_items, b_force );
if( p_root->pp_children[i]->i_children >= 0 )
playlist_NodeDelete( p_playlist, p_root->pp_children[i], b_force );
/* Delete the node */
if( p_root->i_flags & PLAYLIST_RO_FLAG && !b_force )
......
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