changeset 2130:fb57249c8702 trunk

[svn] do not assume that a tuple field exists just cause the tuple does, regexec hates null strings
author giacomo
date Fri, 15 Dec 2006 11:22:42 -0800
parents 0d845907c0b9
children a416e188db64
files ChangeLog audacious/playlist.c
diffstat 2 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 <james@develia.org>
+  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 <nenolod@nenolod.net>
   revision [3261]
   - bail after 15 failures to find an acceptable playback candidate
--- 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( &regex , 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( &regex , 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( &regex , 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( &regex , entry->tuple->file_name , 0 , NULL , 0 ) == 0 ) )
                 {
                     tfound_list = g_list_append( tfound_list , entry );