From: Max Kellermann Date: Wed, 14 Mar 2018 20:28:28 +0000 (+0100) Subject: {Artist,Album}ListPage: use "findadd" instead of "find"+"add" X-Git-Tag: upstream/0.33^2~567 X-Git-Url: http://git.kaliko.me/?p=ncmpc-debian.git;a=commitdiff_plain;h=0024ad14b564e04aebcdfec64192dd4c3a37cc4b;hp=f4e608b0df0b9393a0c953dab02a8efd7909ee48 {Artist,Album}ListPage: use "findadd" instead of "find"+"add" --- diff --git a/src/AlbumListPage.cxx b/src/AlbumListPage.cxx index 1b5b7712..ea7a49f5 100644 --- a/src/AlbumListPage.cxx +++ b/src/AlbumListPage.cxx @@ -26,7 +26,6 @@ #include "i18n.h" #include "charset.hxx" #include "mpdclient.hxx" -#include "filelist.hxx" #include @@ -198,20 +197,14 @@ add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter, 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 diff --git a/src/ArtistListPage.cxx b/src/ArtistListPage.cxx index e8ed34aa..2369ffa5 100644 --- a/src/ArtistListPage.cxx +++ b/src/ArtistListPage.cxx @@ -25,7 +25,6 @@ #include "i18n.h" #include "charset.hxx" #include "mpdclient.hxx" -#include "filelist.hxx" #include @@ -156,17 +155,11 @@ add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter) 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); 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); } inline bool