From 63f86aa8e41318594e3b60bedcf24978df690e2e Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Fri, 4 Oct 2024 20:25:22 -0400 Subject: [PATCH] Add comments in function get_mb_id. --- get_artist_art.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/get_artist_art.c b/get_artist_art.c index 45a0dd8..74ccb74 100644 --- a/get_artist_art.c +++ b/get_artist_art.c @@ -80,10 +80,11 @@ const char *get_mb_id(char *artist_name) { curl = curl_easy_init(); if (curl) { + /*Make the artist name URL safe.*/ char *artist_name_esc = curl_easy_escape(curl, artist_name, 0); printf("%s", artist_name_esc); + /*Format the MB URL to insert the Artist name for the query.*/ snprintf(mb_url_full, sizeof(mb_url_full), mb_url, artist_name_esc); - // snprintf(mb_url_full, sizeof(mb_url_full), "%s", curl_easy_escape(curl, mb_url_full, 0)); printf("%s\n", mb_url_full); curl_easy_setopt(curl, CURLOPT_URL, mb_url_full); curl_easy_setopt(curl, CURLOPT_USERAGENT, "get_artist_art.py/1.0");