4 Commits

Author SHA1 Message Date
63f86aa8e4 Add comments in function get_mb_id. 2024-10-04 20:25:22 -04:00
c7faeb6bc8 get_mb_id now taking artist name as input variable.
The function can now be fed an artist name to be placed in the
MusicBrainz query string. This will allow it to be used in a loop in the
future.
2024-10-04 14:16:04 -04:00
6189a8b17f USERAGENT identifier has been added.
The request to MusicBrainz is now returning real results.
2024-10-04 11:46:32 -04:00
9530bb9190 MusicBraniz request functioning.
It will need to be updated with an identifer to return anything useful.
2024-10-04 11:21:59 -04:00

View File

@@ -1,13 +1,15 @@
#include <libconfig.h>
#include <unistd.h>
#include <curl/curl.h>
#include <libconfig.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define version_str "1.0"
#define conf_file "config.ini"
#define mb_url "https://musicbrainz.org/ws/2/artist?query=artist:\"Slayer\"&fmt=json"
#define mb_url \
"https://musicbrainz.org/ws/2/artist?query=artist:\"%s\"&fmt=json"
const char *get_conf_str(char set_key[10]) {
const char *get_conf_str(char set_key[]) {
const char *prog_conf = malloc(10 * sizeof(char));
config_t cfg;
config_setting_t *setting;
@@ -29,7 +31,7 @@ const char *get_conf_str(char set_key[10]) {
return prog_conf;
}
int get_conf_int(char set_key[10]) {
int get_conf_int(char set_key[]) {
int set_int;
config_t cfg;
config_setting_t *setting;