/* 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 )
{
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;