From e93a9b2d9677b7ef3142a03f370ef545659b5773 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Wed, 16 Oct 2013 22:43:52 +0200 Subject: gtkui: several fixes/improvements in playlist cover rendering --- plugins/artwork/artwork.c | 2 +- plugins/artwork/artwork.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/artwork') diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index cf4b25e0..23d05886 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -90,7 +90,6 @@ static const char *get_default_cover (void) { int make_cache_dir_path (char *path, int size, const char *artist, int img_size) { const char *cache = getenv ("XDG_CACHE_HOME"); - int sz; if (img_size == -1) { @@ -1484,4 +1483,5 @@ static DB_artwork_plugin_t plugin = { .reset = artwork_reset, .get_default_cover = get_default_cover, .get_album_art_sync = get_album_art_sync, + .make_cache_path = make_cache_path, }; diff --git a/plugins/artwork/artwork.h b/plugins/artwork/artwork.h index 1c60475c..117e263d 100644 --- a/plugins/artwork/artwork.h +++ b/plugins/artwork/artwork.h @@ -10,6 +10,8 @@ typedef void (*artwork_callback) (const char *fname, const char *artist, const c typedef struct { DB_misc_t plugin; // returns filename of cached image, or NULL + // negative size has special meanings: + // -1: return default cover if not available (otherwise NULL will be returned) char* (*get_album_art) (const char *fname, const char *artist, const char *album, int size, artwork_callback callback, void *user_data); // this has to be called to clear queue on exit, before caller terminates @@ -19,6 +21,9 @@ typedef struct { // synchronously get filename char* (*get_album_art_sync) (const char *fname, const char *artist, const char *album, int size); + + // creates full path string for cache storage + void (*make_cache_path) (char *path, int size, const char *album, const char *artist, int img_size); } DB_artwork_plugin_t; #endif /*__ARTWORK_H*/ -- cgit v1.2.3