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");