{Artist,Album}ListPage: use "findadd" instead of "find"+"add"
[ncmpc-debian.git] / src / AlbumListPage.cxx
index 4120801..ea7a49f 100644 (file)
@@ -26,7 +26,6 @@
 #include "i18n.h"
 #include "charset.hxx"
 #include "mpdclient.hxx"
-#include "filelist.hxx"
 
 #include <glib.h>
 
@@ -195,26 +194,17 @@ add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter,
                return;
 
        char *str = utf8_to_locale(_filter);
-       if (table == MPD_TAG_ALBUM)
-               screen_status_printf(_("Adding album %s..."), str);
-       else
-               screen_status_printf(_("Adding %s..."), str);
+       screen_status_printf(_("Adding \'%s\' to queue"), str);
        g_free(str);
 
-       mpd_search_db_songs(connection, true);
+       mpd_search_add_db_songs(connection, true);
        mpd_search_add_tag_constraint(connection, MPD_OPERATOR_DEFAULT,
                                      table, _filter);
        if (table == MPD_TAG_ALBUM)
                mpd_search_add_tag_constraint(connection, MPD_OPERATOR_DEFAULT,
                                              MPD_TAG_ARTIST, _artist);
        mpd_search_commit(connection);
-
-       auto *addlist = filelist_new_recv(connection);
-
-       if (mpdclient_finish_command(c))
-               mpdclient_filelist_add_all(c, addlist);
-
-       delete addlist;
+       mpdclient_finish_command(c);
 }
 
 bool