1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-06-24 05:33:17 +00:00

Fix: calculation of coverimage #72

This commit is contained in:
jcorporation 2018-11-05 20:11:40 +00:00
parent 66a59068ce
commit 8bd288a2ff

View File

@ -1490,7 +1490,8 @@ int replacechar(char *str, char orig, char rep) {
}
int mympd_get_cover(const char *uri, char *cover, int cover_len) {
char *path = strdup(uri);
char *orgpath = strdup(uri);
char *path = orgpath;
int len;
if (!config.coverimage) {
@ -1523,7 +1524,7 @@ int mympd_get_cover(const char *uri, char *cover, int cover_len) {
} else
len = snprintf(cover, cover_len, "/assets/coverimage-notavailable.png");
}
free(path);
free(orgpath);
return len;
}