Commit 25ff9ffd authored by Clément Stenac's avatar Clément Stenac

Fixes for random + live search

parent 72d2a5b4
...@@ -315,6 +315,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist ) ...@@ -315,6 +315,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
p_playlist->pp_random[j] = p_tmp; p_playlist->pp_random[j] = p_tmp;
} }
p_playlist->b_reset_random = VLC_FALSE; p_playlist->b_reset_random = VLC_FALSE;
PL_DEBUG( "random rebuilt, have %i items", p_playlist->i_random );
} }
else else
{ {
......
...@@ -92,6 +92,7 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root, ...@@ -92,6 +92,7 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
const char *psz_string ) const char *psz_string )
{ {
int i; int i;
p_playlist->b_reset_random = VLC_TRUE;
for( i = 0 ; i< p_root->i_children ; i ++ ) for( i = 0 ; i< p_root->i_children ; i ++ )
{ {
playlist_item_t *p_item = p_root->pp_children[i]; playlist_item_t *p_item = p_root->pp_children[i];
......
...@@ -368,7 +368,7 @@ int playlist_GetAllEnabledChildren( playlist_t *p_playlist, ...@@ -368,7 +368,7 @@ int playlist_GetAllEnabledChildren( playlist_t *p_playlist,
while( 1 ) while( 1 )
{ {
p_next = playlist_GetNextLeaf( p_playlist, p_node, p_next = playlist_GetNextLeaf( p_playlist, p_node,
p_next, VLC_TRUE, VLC_TRUE ); p_next, VLC_TRUE, VLC_FALSE );
if( p_next ) if( p_next )
INSERT_ELEM( *ppp_items, i_count, i_count, p_next ); INSERT_ELEM( *ppp_items, i_count, i_count, p_next );
else else
......
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