mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 13:39:47 -05:00
[artwork] Use cache stash to avoid making repeated requests
E.g. for an album we would for each track request artwork from Spotify, even though the requests are similar and the first one didn't give a result.
This commit is contained in:
@@ -923,8 +923,11 @@ artwork_get_byurl(struct evbuffer *artwork, const char *url, int max_w, int max_
|
||||
CHECK_NULL(L_ART, raw = evbuffer_new());
|
||||
|
||||
ret = cache_artwork_read(raw, url, &format);
|
||||
if (ret == 0 && format > 0)
|
||||
if (ret == 0)
|
||||
{
|
||||
if (format <= 0)
|
||||
goto error;
|
||||
|
||||
ret = artwork_evbuf_rescale(artwork, raw, max_w, max_h);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user