diff --git a/src/screen_artist.c b/src/screen_artist.c
index 0d81874f96c35d476450e34c1376f8abfbf27ec1..f6de9dde00621d6dbe9b697aeac481e01ebfd4c4 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
/* list_window callback */
static const char *
artist_lw_callback(unsigned idx, G_GNUC_UNUSED bool *highlight,
- G_GNUC_UNUSED void *data)
+ G_GNUC_UNUSED char** sc, G_GNUC_UNUSED void *data)
{
GPtrArray *list = data;
static char buf[BUFSIZE];
}
#ifndef NCMPC_MINI
-/* the playlist have been updated -> fix highlights */
+/* the playlist has been updated -> fix highlights */
static void
playlist_changed_callback(mpdclient_t *c, int event, gpointer data)
{
for (i = 0; i < array->len; ++i) {
char *value = g_ptr_array_index(array, i);
- free(value);
+ g_free(value);
}
g_ptr_array_free(array, TRUE);
if (album[0] == 0)
browser.filelist =
mpdclient_filelist_search(c, TRUE,
- MPD_TABLE_ARTIST,
+ MPD_TAG_ARTIST,
artist);
else
browser.filelist =
mpdclient_filelist_search(c, TRUE,
- MPD_TABLE_ALBUM,
+ MPD_TAG_ALBUM,
album);
if (browser.filelist == NULL)
- browser.filelist = filelist_new(NULL);
+ browser.filelist = filelist_new();
/* add a dummy entry for ".." */
filelist_prepend(browser.filelist, NULL);
}
static void
-add_query(mpdclient_t *c, int table, char *_filter)
+add_query(mpdclient_t *c, enum mpd_tag_type table, char *_filter)
{
char *str;
mpdclient_filelist_t *addlist;
assert(filter != NULL);
str = utf8_to_locale(_filter);
- if (table== MPD_TABLE_ALBUM)
+ if (table == MPD_TAG_ALBUM)
screen_status_printf("Adding album %s...", str);
else
screen_status_printf("Adding %s...", str);
for(i = browser.lw->selected_start; i <= browser.lw->selected_end; ++i)
{
selected = g_ptr_array_index(artist_list, i);
- add_query(c, MPD_TABLE_ARTIST, selected);
+ add_query(c, MPD_TAG_ARTIST, selected);
cmd = CMD_LIST_NEXT; /* continue and select next item... */
}
break;
for(i = browser.lw->selected_start; i <= browser.lw->selected_end; ++i)
{
if(i == album_list->len + 1)
- add_query(c, MPD_TABLE_ARTIST, artist);
+ add_query(c, MPD_TAG_ARTIST, artist);
else if (i > 0)
{
selected = g_ptr_array_index(album_list,
browser.lw->selected - 1);
- add_query(c, MPD_TABLE_ALBUM, selected);
+ add_query(c, MPD_TAG_ALBUM, selected);
cmd = CMD_LIST_NEXT; /* continue and select next item... */
}
}