1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-01-13 10:50:36 +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) { 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; int len;
if (!config.coverimage) { if (!config.coverimage) {
@ -1523,7 +1524,7 @@ int mympd_get_cover(const char *uri, char *cover, int cover_len) {
} else } else
len = snprintf(cover, cover_len, "/assets/coverimage-notavailable.png"); len = snprintf(cover, cover_len, "/assets/coverimage-notavailable.png");
} }
free(path); free(orgpath);
return len; return len;
} }