]> git.sesse.net Git - vlc/commitdiff
Fixes for random + live search
authorClément Stenac <zorglub@videolan.org>
Sat, 2 Sep 2006 17:07:46 +0000 (17:07 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 2 Sep 2006 17:07:46 +0000 (17:07 +0000)
src/playlist/control.c
src/playlist/search.c
src/playlist/tree.c

index 7cc468d9f508af962450d62f6721b804186e5dac..630f3a7fde9198328548fb6b7912b77cc7b8dc38 100644 (file)
@@ -315,6 +315,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
                 p_playlist->pp_random[j] = p_tmp;
             }
             p_playlist->b_reset_random = VLC_FALSE;
+            PL_DEBUG( "random rebuilt, have %i items", p_playlist->i_random );
         }
         else
         {
index 6a7f636d1a718090da4a488f09f64802430dd240..e1a35211b4c171a375263a52f8e656b5db94e9a4 100644 (file)
@@ -92,6 +92,7 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
                                const char *psz_string )
 {
    int i;
+   p_playlist->b_reset_random = VLC_TRUE;
    for( i = 0 ; i< p_root->i_children ; i ++ )
    {
         playlist_item_t *p_item = p_root->pp_children[i];
index cb18d9a192b820bc120cc29a015a546264e71af7..3d73384f1a3331f6f93c8c388070405ee290fe2e 100644 (file)
@@ -368,7 +368,7 @@ int playlist_GetAllEnabledChildren( playlist_t *p_playlist,
     while( 1 )
     {
         p_next = playlist_GetNextLeaf( p_playlist, p_node,
-                                       p_next, VLC_TRUE, VLC_TRUE );
+                                       p_next, VLC_TRUE, VLC_FALSE );
         if( p_next )
             INSERT_ELEM( *ppp_items, i_count, i_count, p_next );
         else