# HG changeset patch # User giacomo # Date 1166210562 28800 # Node ID fb57249c8702dedb17b3ca66d7abdd91e46f2747 # Parent 0d845907c0b99b3aebc2d3ddf2271c403d0cb24d [svn] do not assume that a tuple field exists just cause the tuple does, regexec hates null strings diff -r 0d845907c0b9 -r fb57249c8702 ChangeLog --- a/ChangeLog Fri Dec 15 11:14:46 2006 -0800 +++ b/ChangeLog Fri Dec 15 11:22:42 2006 -0800 @@ -1,3 +1,12 @@ +2006-12-15 19:14:46 +0000 Giacomo Lozito + revision [3263] + added a regex-based search option in playlist that allows to select playlist entries using multiple match criteria + trunk/audacious/playlist.c | 131 ++++++++++++++++++++++++++++++++++++++++++ + trunk/audacious/playlist.h | 1 + trunk/audacious/ui_playlist.c | 114 +++++++++++++++++++++++++++++++++++- + 3 files changed, 244 insertions(+), 2 deletions(-) + + 2006-12-15 18:48:13 +0000 William Pitcock revision [3261] - bail after 15 failures to find an acceptable playback candidate diff -r 0d845907c0b9 -r fb57249c8702 audacious/playlist.c --- a/audacious/playlist.c Fri Dec 15 11:14:46 2006 -0800 +++ b/audacious/playlist.c Fri Dec 15 11:22:42 2006 -0800 @@ -2729,7 +2729,7 @@ for ( ; entry_list ; entry_list = g_list_next(entry_list) ) { PlaylistEntry *entry = entry_list->data; - if ( ( entry->tuple != NULL ) && + if ( ( entry->tuple != NULL ) && ( entry->tuple->track_name != NULL ) && ( regexec( ®ex , entry->tuple->track_name , 0 , NULL , 0 ) == 0 ) ) { tfound_list = g_list_append( tfound_list , entry ); @@ -2755,7 +2755,7 @@ for ( ; entry_list ; entry_list = g_list_next(entry_list) ) { PlaylistEntry *entry = entry_list->data; - if ( ( entry->tuple != NULL ) && + if ( ( entry->tuple != NULL ) && ( entry->tuple->album_name != NULL ) && ( regexec( ®ex , entry->tuple->album_name , 0 , NULL , 0 ) == 0 ) ) { tfound_list = g_list_append( tfound_list , entry ); @@ -2781,7 +2781,7 @@ for ( ; entry_list ; entry_list = g_list_next(entry_list) ) { PlaylistEntry *entry = entry_list->data; - if ( ( entry->tuple != NULL ) && + if ( ( entry->tuple != NULL ) && ( entry->tuple->performer != NULL ) && ( regexec( ®ex , entry->tuple->performer , 0 , NULL , 0 ) == 0 ) ) { tfound_list = g_list_append( tfound_list , entry ); @@ -2807,7 +2807,7 @@ for ( ; entry_list ; entry_list = g_list_next(entry_list) ) { PlaylistEntry *entry = entry_list->data; - if ( ( entry->tuple != NULL ) && + if ( ( entry->tuple != NULL ) && ( entry->tuple->file_name != NULL ) && ( regexec( ®ex , entry->tuple->file_name , 0 , NULL , 0 ) == 0 ) ) { tfound_list = g_list_append( tfound_list , entry );