summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3d8c87)
raw | patch | inline | side by side (parent: c3d8c87)
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Sat, 27 Aug 2011 00:19:02 +0000 (02:19 +0200) | ||
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Mon, 29 Aug 2011 20:37:37 +0000 (22:37 +0200) |
src/screen_artist.c | patch | blob | history |
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 185c57483ca5b434fc2601839b80c3305bf16f98..1d279b9cffb2c9a38ea649b58139c2e333393527 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
artist_repaint();
}
+/* _artist is actually only used in the ALBUM case to distinguish albums with
+ the same name from different artists. */
static void
-add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter)
+add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter,
+ const char *_artist)
{
struct mpd_connection *connection = mpdclient_get_connection(c);
char *str;
table, _filter);
if (table == MPD_TAG_ALBUM)
mpd_search_add_tag_constraint(connection, MPD_OPERATOR_DEFAULT,
- MPD_TAG_ARTIST, artist);
+ MPD_TAG_ARTIST, _artist);
mpd_search_commit(connection);
addlist = filelist_new_recv(connection);
list_window_get_range(browser.lw, &range);
for (unsigned i = range.start; i < range.end; ++i) {
selected = g_ptr_array_index(artist_list, i);
- add_query(c, MPD_TAG_ARTIST, selected);
+ add_query(c, MPD_TAG_ARTIST, selected, NULL);
cmd = CMD_LIST_NEXT; /* continue and select next item... */
}
break;
list_window_get_range(browser.lw, &range);
for (unsigned i = range.start; i < range.end; ++i) {
if(i == album_list->len + 1)
- add_query(c, MPD_TAG_ARTIST, artist);
+ add_query(c, MPD_TAG_ARTIST, artist, NULL);
else if (i > 0)
{
selected = g_ptr_array_index(album_list,
browser.lw->selected - 1);
- add_query(c, MPD_TAG_ALBUM, selected);
+ add_query(c, MPD_TAG_ALBUM, selected, artist);
cmd = CMD_LIST_NEXT; /* continue and select next item... */
}
}