Commit b33f6553 authored by Clément Stenac's avatar Clément Stenac

* Search on artist and album

* Remove some debug
parent 3790497d
......@@ -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 )
......
......@@ -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;
......
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