]> git.sesse.net Git - vlc/commitdiff
* Search on artist and album
authorClément Stenac <zorglub@videolan.org>
Thu, 25 May 2006 09:04:19 +0000 (09:04 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 25 May 2006 09:04:19 +0000 (09:04 +0000)
* Remove some debug

src/playlist/item.c
src/playlist/search.c

index 019dc88aec08bda9a69f762d7636ae1945783d37..1285fe074ce44b1b3d959c3092e46aa9ca239918 100644 (file)
@@ -357,13 +357,11 @@ int playlist_BothAddInput( playlist_t *p_playlist,
     /* Add to category */
     p_item = playlist_ItemNewFromInput( p_playlist, p_input );
     if( p_item == NULL ) return VLC_EGENERIC;
-    fprintf( stderr, "Adding to CATEGORY\n");
     AddItem( p_playlist, p_item, p_direct_parent, i_pos );
 
     /* Add to onelevel */
     p_item = playlist_ItemNewFromInput( p_playlist, p_input );
     if( p_item == NULL ) return VLC_EGENERIC;
-    fprintf( stderr, "Adding to ONE\n");
 
     p_up = p_direct_parent;
     while( p_up->p_parent != p_playlist->p_root_category )
index 29c0779620924385ff9703cc4568ca780cfb3a62..10a8b706a30b5e1eabef8217d75c05c0e71274fb 100644 (file)
@@ -99,8 +99,12 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
         {
             playlist_LiveSearchUpdate( p_playlist, p_item, psz_string );
         }
+#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 ) )
         /* Todo: Filter on all fields */
-        if( strcasestr( p_item->p_input->psz_name, 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;