mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[artwork] Refactor artwork to make it easier to add new backends (WIP)
This commit is contained in:
parent
599fb20e0b
commit
238ee3c122
873
src/artwork.c
873
src/artwork.c
File diff suppressed because it is too large
Load Diff
@ -7,15 +7,36 @@
|
|||||||
|
|
||||||
#include <event2/buffer.h>
|
#include <event2/buffer.h>
|
||||||
|
|
||||||
/* Get artwork for individual track */
|
/*
|
||||||
|
* Get the artwork image for an individual item (track)
|
||||||
|
*
|
||||||
|
* @out evbuf Event buffer that will contain the (scaled) image
|
||||||
|
* @in id The mfi item id
|
||||||
|
* @in max_w Requested maximum image width (may not be obeyed)
|
||||||
|
* @in max_h Requested maximum image height (may not be obeyed)
|
||||||
|
* @return ART_FMT_* on success, -1 on error or no artwork found
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
artwork_get_item(struct evbuffer *evbuf, int id, int max_w, int max_h);
|
artwork_get_item(struct evbuffer *evbuf, int id, int max_w, int max_h);
|
||||||
|
|
||||||
/* Get artwork for album or artist */
|
/*
|
||||||
|
* Get the artwork image for a group (an album or an artist)
|
||||||
|
*
|
||||||
|
* @out evbuf Event buffer that will contain the (scaled) image
|
||||||
|
* @in id The group id (not the persistentid)
|
||||||
|
* @in max_w Requested maximum image width (may not be obeyed)
|
||||||
|
* @in max_h Requested maximum image height (may not be obeyed)
|
||||||
|
* @return ART_FMT_* on success, -1 on error or no artwork found
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
artwork_get_group(struct evbuffer *evbuf, int id, int max_w, int max_h);
|
artwork_get_group(struct evbuffer *evbuf, int id, int max_w, int max_h);
|
||||||
|
|
||||||
/* Checks if the file is an artwork file */
|
/*
|
||||||
|
* Checks if the file is an artwork file (based on user config)
|
||||||
|
*
|
||||||
|
* @in filename Name of the file
|
||||||
|
* @return 1 if true, 0 if false
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
artwork_file_is_artwork(const char *filename);
|
artwork_file_is_artwork(const char *filename);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user