Index: apps/recorder/albumart.c =================================================================== --- apps/recorder/albumart.c (revision 16109) +++ apps/recorder/albumart.c (working copy) @@ -27,6 +27,7 @@ #include "dircache.h" #include "debug.h" #include "misc.h" +#include "settings.h" /* Strip filename from a full path @@ -79,6 +80,8 @@ for (i = 0; i <= count; i++, path++) { + if (*path == 0) + return; if (*path == '"') *path = '\''; else if (strchr(invalid_chars, *path)) @@ -92,6 +95,7 @@ * ./cover.bmp * ../.bmp * ../cover.bmp + * ROCKBOX_DIR/albumart/-.bmp * is the value of the size_string parameter, and * are read from the ID3 metadata. * If a matching bitmap is found, its filename is stored in buf. @@ -140,6 +144,19 @@ if (!found) { + /* look in the albumart subdir of .rockbox */ + snprintf(path, sizeof(path), + ROCKBOX_DIR "/albumart/%s-%s%s.bmp", + id3->artist, + id3->album, + size_string); + fix_path_part(path, strlen(ROCKBOX_DIR "/albumart/"), MAX_PATH); + DEBUGF("Looking for %s\n", path); + found = file_exists(path); + } + + if (!found) + { /* if it still doesn't exist, * we continue to search in the parent directory */ strcpy(path, dir);