From: Hugo Villeneuve Date: Sat, 7 Jan 2023 00:32:33 +0000 (-0500) Subject: DEBUG X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=056edc6065b0549e01bf058e541a3340e4e9b1cc;p=ympd.git DEBUG --- diff --git a/src/mpd_client.c b/src/mpd_client.c index 586f4f2..bc1c467 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -77,6 +77,8 @@ int callback_mpd(struct mg_connection *c) { cmd_id != MPD_API_GET_MPDHOST && cmd_id != MPD_API_SET_MPDPASS) return MG_TRUE; + printf("API: \"%s\"\n", c->content); + switch (cmd_id) { case MPD_API_AUTHORIZE: p_charbuf = strdup(c->content); @@ -238,6 +240,7 @@ int callback_mpd(struct mg_connection *c) { free(p_charbuf); p_charbuf = strdup(c->content); + printf(" PLAYLIST NAME = %s\n", get_arg2(p_charbuf)); n = mpd_put_playlist(mpd.buf, get_arg2(p_charbuf), uint_buf); out_playlist: free(p_charbuf); @@ -770,6 +773,8 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset) { case MPD_ENTITY_TYPE_PLAYLIST: pl = mpd_entity_get_playlist(entity); + printf("playlist: %s\n", + mpd_playlist_get_path(pl)); cur += json_emit_raw_str(cur, end - cur, "{\"type\":\"playlist\",\"plist\":"); cur += json_emit_quoted_str(cur, end - cur, mpd_playlist_get_path(pl)); cur += json_emit_raw_str(cur, end - cur, "},");