Compare commits
4 Commits
accept_swi
...
mb_request
| Author | SHA1 | Date | |
|---|---|---|---|
| 63f86aa8e4 | |||
| c7faeb6bc8 | |||
| 6189a8b17f | |||
| 9530bb9190 |
134
get_artist_art.c
134
get_artist_art.c
@@ -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;
|
||||