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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 3adedc8159..da85f99bbc 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -91,7 +91,7 @@ static void fix_path_part(char* path, int offset, int count)
91 } 91 }
92} 92}
93 93
94#if LCD_DEPTH > 1 94#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
95const char * extensions[] = { "jpeg", "jpg", "bmp" }; 95const char * extensions[] = { "jpeg", "jpg", "bmp" };
96int extension_lens[] = { 4, 3, 3 }; 96int extension_lens[] = { 4, 3, 3 };
97/* Try checking for several file extensions, return true if a file is found and 97/* Try checking for several file extensions, return true if a file is found and
@@ -134,7 +134,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
134 const char *artist; 134 const char *artist;
135 int dirlen; 135 int dirlen;
136 int albumlen; 136 int albumlen;
137#if LCD_DEPTH > 1 137#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
138 int pathlen; 138 int pathlen;
139#endif 139#endif
140 140
@@ -153,7 +153,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
153 /* the first file we look for is one specific to the track playing */ 153 /* the first file we look for is one specific to the track playing */
154 strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname); 154 strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
155 strcat(path, size_string); 155 strcat(path, size_string);
156#if LCD_DEPTH > 1 156#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
157 strcat(path, "."); 157 strcat(path, ".");
158 pathlen = strlen(path); 158 pathlen = strlen(path);
159 found = try_exts(path, pathlen); 159 found = try_exts(path, pathlen);
@@ -165,7 +165,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
165 { 165 {
166 /* if it doesn't exist, 166 /* if it doesn't exist,
167 * we look for a file specific to the track's album name */ 167 * we look for a file specific to the track's album name */
168#if LCD_DEPTH > 1 168#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
169 pathlen = snprintf(path, sizeof(path), 169 pathlen = snprintf(path, sizeof(path),
170 "%s%s%s.", dir, id3->album, size_string); 170 "%s%s%s.", dir, id3->album, size_string);
171 fix_path_part(path, dirlen, albumlen); 171 fix_path_part(path, dirlen, albumlen);
@@ -181,7 +181,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
181 if (!found) 181 if (!found)
182 { 182 {
183 /* if it still doesn't exist, we look for a generic file */ 183 /* if it still doesn't exist, we look for a generic file */
184#if LCD_DEPTH > 1 184#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
185 pathlen = snprintf(path, sizeof(path), 185 pathlen = snprintf(path, sizeof(path),
186 "%scover%s.", dir, size_string); 186 "%scover%s.", dir, size_string);
187 found = try_exts(path, pathlen); 187 found = try_exts(path, pathlen);
@@ -192,7 +192,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
192#endif 192#endif
193 } 193 }
194 194
195#if LCD_DEPTH > 1 195#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
196 if (!found) 196 if (!found)
197 { 197 {
198 snprintf (path, sizeof(path), "%sfolder.jpg", dir); 198 snprintf (path, sizeof(path), "%sfolder.jpg", dir);
@@ -205,7 +205,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
205 if (!found && artist && id3->album) 205 if (!found && artist && id3->album)
206 { 206 {
207 /* look in the albumart subdir of .rockbox */ 207 /* look in the albumart subdir of .rockbox */
208#if LCD_DEPTH > 1 208#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
209 pathlen = snprintf(path, sizeof(path), 209 pathlen = snprintf(path, sizeof(path),
210 ROCKBOX_DIR "/albumart/%s-%s%s.", 210 ROCKBOX_DIR "/albumart/%s-%s%s.",
211 artist, 211 artist,
@@ -241,7 +241,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
241 { 241 {
242 /* we look in the parent directory 242 /* we look in the parent directory
243 * for a file specific to the track's album name */ 243 * for a file specific to the track's album name */
244#if LCD_DEPTH > 1 244#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
245 pathlen = snprintf(path, sizeof(path), 245 pathlen = snprintf(path, sizeof(path),
246 "%s%s%s.", dir, id3->album, size_string); 246 "%s%s%s.", dir, id3->album, size_string);
247 fix_path_part(path, dirlen, albumlen); 247 fix_path_part(path, dirlen, albumlen);
@@ -258,7 +258,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
258 { 258 {
259 /* if it still doesn't exist, we look in the parent directory 259 /* if it still doesn't exist, we look in the parent directory
260 * for a generic file */ 260 * for a generic file */
261#if LCD_DEPTH > 1 261#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
262 pathlen = snprintf(path, sizeof(path), 262 pathlen = snprintf(path, sizeof(path),
263 "%scover%s.", dir, size_string); 263 "%scover%s.", dir, size_string);
264 found = try_exts(path, pathlen); 264 found = try_exts(path, pathlen);
@@ -278,7 +278,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
278 return true; 278 return true;
279} 279}
280 280
281#ifdef HAVE_ALBUMART 281#ifndef PLUGIN
282/* Look for albumart bitmap in the same dir as the track and in its parent dir. 282/* Look for albumart bitmap in the same dir as the track and in its parent dir.
283 * Stores the found filename in the buf parameter. 283 * Stores the found filename in the buf parameter.
284 * Returns true if a bitmap was found, false otherwise */ 284 * Returns true if a bitmap was found, false otherwise */
@@ -386,4 +386,4 @@ void get_albumart_size(struct bitmap *bmp)
386 bmp->width = data->albumart_max_width; 386 bmp->width = data->albumart_max_width;
387 bmp->height = data->albumart_max_height; 387 bmp->height = data->albumart_max_height;
388} 388}
389#endif /* HAVE_ALBUMART */ 389#endif /* PLUGIN */