diff options
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/albumart.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index f1315da71f..4507923144 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "dircache.h" | 28 | #include "dircache.h" |
29 | #include "misc.h" | 29 | #include "misc.h" |
30 | #include "settings.h" | 30 | #include "settings.h" |
31 | #include "wps.h" | ||
31 | 32 | ||
32 | /* Define LOGF_ENABLE to enable logf output in this file */ | 33 | /* Define LOGF_ENABLE to enable logf output in this file */ |
33 | /*#define LOGF_ENABLE*/ | 34 | /*#define LOGF_ENABLE*/ |
@@ -279,16 +280,16 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen) | |||
279 | return false; | 280 | return false; |
280 | 281 | ||
281 | char size_string[9]; | 282 | char size_string[9]; |
282 | struct wps_data *data = gui_wps[0].data; | 283 | int width = 0, height = 0; |
283 | 284 | ||
284 | if (!data) | 285 | if (!wps_uses_albumart(&width, &height)) |
285 | return false; | 286 | return false; |
286 | 287 | ||
287 | logf("Looking for album art for %s", id3->path); | 288 | logf("Looking for album art for %s", id3->path); |
288 | 289 | ||
289 | /* Write the size string, e.g. ".100x100". */ | 290 | /* Write the size string, e.g. ".100x100". */ |
290 | snprintf(size_string, sizeof(size_string), ".%dx%d", | 291 | snprintf(size_string, sizeof(size_string), ".%dx%d", |
291 | data->albumart_max_width, data->albumart_max_height); | 292 | width, height); |
292 | 293 | ||
293 | /* First we look for a bitmap of the right size */ | 294 | /* First we look for a bitmap of the right size */ |
294 | if (search_albumart_files(id3, size_string, buf, buflen)) | 295 | if (search_albumart_files(id3, size_string, buf, buflen)) |
@@ -372,9 +373,14 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear) | |||
372 | void get_albumart_size(struct bitmap *bmp) | 373 | void get_albumart_size(struct bitmap *bmp) |
373 | { | 374 | { |
374 | /* FIXME: What should we do with albumart on remote? */ | 375 | /* FIXME: What should we do with albumart on remote? */ |
375 | struct wps_data *data = gui_wps[0].data; | 376 | int width, height; |
376 | 377 | ||
377 | bmp->width = data->albumart_max_width; | 378 | if (!wps_uses_albumart(&width, &height)) |
378 | bmp->height = data->albumart_max_height; | 379 | { |
380 | width = 0; height = 0; | ||
381 | } | ||
382 | |||
383 | bmp->width = width; | ||
384 | bmp->height = height; | ||
379 | } | 385 | } |
380 | #endif /* PLUGIN */ | 386 | #endif /* PLUGIN */ |