[vlc-commits] commit: Playlist search: proper case-insensitive search (fix #4214) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Fri Oct 8 20:44:24 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Oct  8 21:41:07 2010 +0300| [57d7451344c7890d845a43decb89d7f5df4e732d] | committer: Rémi Denis-Courmont 

Playlist search: proper case-insensitive search (fix #4214)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57d7451344c7890d845a43decb89d7f5df4e732d
---

 src/playlist/search.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/playlist/search.c b/src/playlist/search.c
index 773496e..6e47807 100644
--- a/src/playlist/search.c
+++ b/src/playlist/search.c
@@ -26,7 +26,8 @@
 #include <assert.h>
 
 #include <vlc_common.h>
-#include "vlc_playlist.h"
+#include <vlc_playlist.h>
+#include <vlc_charset.h>
 #include "playlist_internal.h"
 
 /***************************************************************************
@@ -134,12 +135,12 @@ static bool playlist_LiveSearchUpdateInternal( playlist_item_t *p_root,
                     psz_title = p_item->p_input->psz_name;
                 const char *psz_album = vlc_meta_Get( p_item->p_input->p_meta, vlc_meta_Album );
                 const char *psz_artist = vlc_meta_Get( p_item->p_input->p_meta, vlc_meta_Artist );
-                b_enable = ( psz_title && strcasestr( psz_title, psz_string ) ) ||
-                           ( psz_album && strcasestr( psz_album, psz_string ) ) ||
-                           ( psz_artist && strcasestr( psz_artist, psz_string ) );
+                b_enable = ( psz_title && vlc_strcasestr( psz_title, psz_string ) ) ||
+                           ( psz_album && vlc_strcasestr( psz_album, psz_string ) ) ||
+                           ( psz_artist && vlc_strcasestr( psz_artist, psz_string ) );
             }
             else
-                b_enable = p_item->p_input->psz_name && strcasestr( p_item->p_input->psz_name, psz_string );
+                b_enable = p_item->p_input->psz_name && vlc_strcasestr( p_item->p_input->psz_name, psz_string );
             vlc_mutex_unlock( &p_item->p_input->lock );
         }
 



More information about the vlc-commits mailing list