Commit 4f5acdf3 authored by Przemyslaw Fiala's avatar Przemyslaw Fiala Committed by Pierre d'Herbemont

Don't restart playlist after converting current item to node

Signed-off-by: default avatarPierre d'Herbemont <pdherbemont@videolan.org>
parent 9eb047da
......@@ -609,6 +609,26 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
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 );
}
......
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