Code

search screen works now using the new tag searching api
authorAndreas Obergrusberger <tradiaz@yahoo.de>
Fri, 4 Aug 2006 21:14:16 +0000 (21:14 +0000)
committerAndreas Obergrusberger <tradiaz@yahoo.de>
Fri, 4 Aug 2006 21:14:16 +0000 (21:14 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4550 09075e82-0dd4-0310-85a5-a0d7c8717e4f

configure.ac
src/screen_search.c

index 9078e9afff4d9b41414c4659fe2be6e981799a1b..957db949d4e0638840eee526cd1cafc1cae6af83 100644 (file)
@@ -242,15 +242,12 @@ AC_ARG_ENABLE([search-screen],
               AC_HELP_STRING([--enable-search-screen],
                             [Enable search screen (EXPERIMENTAL) @<:@default=yes@:>@]),
              [search_screen="$enableval"],
-             [search_screen=no])
-#AC_MSG_RESULT([$search_screen])
+             [search_screen=yes])
+AC_MSG_RESULT([$search_screen])
 if test "x$search_screen" != "xyes" ; then
    AC_DEFINE(DISABLE_SEARCH_SCREEN, 1, [Disable search screen])
 fi
-AC_MSG_WARN([search screen unavailable due to issues with libmpdclient update])
-AC_DEFINE(DISABLE_SEARCH_SCREEN, 1, [Disable search screen]) 
-AC_MSG_RESULT([$search_screen])  
-
+  
 dnl Optional screen - key editor
 AC_MSG_CHECKING([whether to include the key editor screen])
 AC_ARG_ENABLE([key-screen], 
index 857d682aafa490101b396da39b0353d413f3a8f9..7ff3f44602693e7ce87cbf1f3e2ae4148065093c 100644 (file)
@@ -277,18 +277,14 @@ search_advanced_query(char *query, mpdclient_t *c)
       mpd_InfoEntity *entity;
 
       /** stupid - but this is just a test...... (fulhack)  */
-      mpd_sendSearchTagCommand(c->connection, 
-                              table[0], arg[0],
-                              table[1], arg[1],
-                              table[2], arg[2],
-                              table[3], arg[3],
-                              table[4], arg[4],
-                              table[5], arg[5],
-                              table[6], arg[6],
-                              table[7], arg[7],
-                              table[8], arg[8],
-                              table[9], arg[9]);
-
+         int iter;
+         for(iter = 0; i < 10; i++)
+         {
+                 mpd_addConstraintSearch(c->connection, table[i], arg[i]);
+         }               
+                       
+         mpd_commitSearch(c->connection);
+         
       filelist = g_malloc0(sizeof(mpdclient_filelist_t));
 
       while( (entity=mpd_getNextInfoEntity(c->connection)) )