Fix searching in tree playlists (doesn't hide a node's children if the children match...
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 3 Dec 2006 21:00:42 +0000 (21:00 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 3 Dec 2006 21:00:42 +0000 (21:00 +0000)
src/playlist/search.c

index c709074..659b9a4 100644 (file)
@@ -100,11 +100,14 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
 #define META_MATCHES( field ) ( p_item->p_input->p_meta && \
                                 p_item->p_input->p_meta->psz_##field && \
                                 strcasestr( p_item->p_input->p_meta->psz_##field, psz_string ) )
-        if( strcasestr( p_item->p_input->psz_name, psz_string ) ||
-            META_MATCHES( artist ) || META_MATCHES( album ) )
-            p_item->i_flags &= ~PLAYLIST_DBL_FLAG;
         else
-            p_item->i_flags |= PLAYLIST_DBL_FLAG;
+        {
+            if( strcasestr( p_item->p_input->psz_name, psz_string ) ||
+                META_MATCHES( artist ) || META_MATCHES( album ) )
+                p_item->i_flags &= ~PLAYLIST_DBL_FLAG;
+            else
+                p_item->i_flags |= PLAYLIST_DBL_FLAG;
+        }
    }
    vlc_cond_signal( &p_playlist->object_wait );
    return VLC_SUCCESS;