summaryrefslogtreecommitdiff
path: root/apps/recorder/albumart.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/albumart.c')
-rw-r--r--apps/recorder/albumart.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index bb2fae4af7..b668bf4eba 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -274,22 +274,18 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
274/* Look for albumart bitmap in the same dir as the track and in its parent dir. 274/* Look for albumart bitmap in the same dir as the track and in its parent dir.
275 * Stores the found filename in the buf parameter. 275 * Stores the found filename in the buf parameter.
276 * Returns true if a bitmap was found, false otherwise */ 276 * Returns true if a bitmap was found, false otherwise */
277bool find_albumart(const struct mp3entry *id3, char *buf, int buflen) 277bool find_albumart(const struct mp3entry *id3, char *buf, int buflen,
278 struct dim *dim)
278{ 279{
279 if (!id3 || !buf) 280 if (!id3 || !buf)
280 return false; 281 return false;
281 282
282 char size_string[9]; 283 char size_string[9];
283 int width = 0, height = 0;
284
285 if (!wps_uses_albumart(&width, &height))
286 return false;
287
288 logf("Looking for album art for %s", id3->path); 284 logf("Looking for album art for %s", id3->path);
289 285
290 /* Write the size string, e.g. ".100x100". */ 286 /* Write the size string, e.g. ".100x100". */
291 snprintf(size_string, sizeof(size_string), ".%dx%d", 287 snprintf(size_string, sizeof(size_string), ".%dx%d",
292 width, height); 288 dim->width, dim->height);
293 289
294 /* First we look for a bitmap of the right size */ 290 /* First we look for a bitmap of the right size */
295 if (search_albumart_files(id3, size_string, buf, buflen)) 291 if (search_albumart_files(id3, size_string, buf, buflen))
@@ -376,17 +372,4 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
376 } 372 }
377} 373}
378 374
379void get_albumart_size(struct bitmap *bmp)
380{
381 /* FIXME: What should we do with albumart on remote? */
382 int width, height;
383
384 if (!wps_uses_albumart(&width, &height))
385 {
386 width = 0; height = 0;
387 }
388
389 bmp->width = width;
390 bmp->height = height;
391}
392#endif /* PLUGIN */ 375#endif /* PLUGIN */