[artwork] Introduce constant for default artwork width/height

This commit is contained in:
chme 2018-11-28 20:28:38 +01:00
parent 89ca5e8ba9
commit 534bbdb477
3 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,9 @@
#define ART_FMT_PNG 1
#define ART_FMT_JPEG 2
#define ART_DEFAULT_HEIGHT 600
#define ART_DEFAULT_WIDTH 600
#include <event2/buffer.h>
/*

View File

@ -4702,7 +4702,7 @@ artwork_cb(struct evhttp_request *req, void *arg)
return;
}
format = artwork_get_item(evbuffer, itemid, 600, 600);
format = artwork_get_item(evbuffer, itemid, ART_DEFAULT_WIDTH, ART_DEFAULT_HEIGHT);
if (format < 0)
{
httpd_send_error(req, HTTP_NOTFOUND, "Document was not found");

View File

@ -879,7 +879,7 @@ raop_metadata_prepare(int id)
goto skip_artwork;
}
ret = artwork_get_item(rmd->artwork, queue_item->file_id, 600, 600);
ret = artwork_get_item(rmd->artwork, queue_item->file_id, ART_DEFAULT_WIDTH, ART_DEFAULT_HEIGHT);
if (ret < 0)
{
DPRINTF(E_INFO, L_RAOP, "Failed to retrieve artwork for file id %d; no artwork will be sent\n", id);