diff options
author | 2009-11-30 21:16:45 +0100 | |
---|---|---|
committer | 2009-11-30 21:16:45 +0100 | |
commit | 312708ff37f4edd0f4d5777b63ffc0af7c7237da (patch) | |
tree | 63fdf857a60455853a1b6fd0b8023f16a98f7018 /playlist.c | |
parent | 001b2e2d997f8efb6bdeffe5caa1d1a8b3ee9243 (diff) |
search window fixed in gtkui plugin
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -35,6 +35,7 @@ #include "junklib.h" #include "vfs.h" #include "conf.h" +#include "utf8.h" // 1.0->1.1 changelog: // added sample-accurate seek positions for sub-tracks @@ -1771,3 +1772,31 @@ pl_move_items (int iter, playItem_t *drop_before, uint32_t *indexes, int count) playlist_tail[iter] = tail; } } + +int +pl_process_search (const char *text) { + playlist_head[PL_SEARCH] = NULL; + playlist_tail[PL_SEARCH] = NULL; + int search_count = 0; + if (*text) { + for (playItem_t *it = playlist_head[PL_MAIN]; it; it = it->next[PL_MAIN]) { + for (metaInfo_t *m = it->meta; m; m = m->next) { +// if (strcasestr (m->value, text)) { + if (utfcasestr (m->value, text)) { + // add to list + it->next[PL_SEARCH] = NULL; + if (playlist_tail[PL_SEARCH]) { + playlist_tail[PL_SEARCH]->next[PL_SEARCH] = it; + playlist_tail[PL_SEARCH] = it; + } + else { + playlist_head[PL_SEARCH] = playlist_tail[PL_SEARCH] = it; + } + search_count++; + break; + } + } + } + } + return search_count; +} |