summaryrefslogtreecommitdiff
path: root/plugins/artwork
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-16 22:43:52 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-16 22:43:52 +0200
commite93a9b2d9677b7ef3142a03f370ef545659b5773 (patch)
tree3005858226bb439a72c5cc852ee55b7ea52ec198 /plugins/artwork
parentc700c20bb67117dd57ff3130b1a1d46c53b8c626 (diff)
gtkui: several fixes/improvements in playlist cover rendering
Diffstat (limited to 'plugins/artwork')
-rw-r--r--plugins/artwork/artwork.c2
-rw-r--r--plugins/artwork/artwork.h5
2 files changed, 6 insertions, 1 deletions
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*/