forked from len0rd/rockbox
Suggested by Thomas Martitz, don't check for track-specific files when searching for covers in PictureFlow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34589f6ccb
commit
f51189cd5e
2 changed files with 12 additions and 8 deletions
|
@ -892,7 +892,7 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf,
|
||||||
rb->get_metadata(&id3, fd, tcs.result);
|
rb->get_metadata(&id3, fd, tcs.result);
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
if ( search_albumart_files(&id3, "", buf, buflen) )
|
if ( search_albumart_files(&id3, ":", buf, buflen) )
|
||||||
result = true;
|
result = true;
|
||||||
else
|
else
|
||||||
result = false;
|
result = false;
|
||||||
|
|
|
@ -156,13 +156,17 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
albumlen = id3->album ? strlen(id3->album) : 0;
|
albumlen = id3->album ? strlen(id3->album) : 0;
|
||||||
|
|
||||||
/* the first file we look for is one specific to the track playing */
|
/* the first file we look for is one specific to the track playing */
|
||||||
strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
|
if (*size_string == ':')
|
||||||
strcat(path, size_string);
|
size_string++;
|
||||||
strcat(path, "." EXT);
|
else {
|
||||||
#ifdef USE_JPEG_COVER
|
strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
|
||||||
pathlen = strlen(path);
|
strcat(path, size_string);
|
||||||
#endif
|
strcat(path, "." EXT);
|
||||||
found = try_exts(path, pathlen);
|
#ifdef USE_JPEG_COVER
|
||||||
|
pathlen = strlen(path);
|
||||||
|
#endif
|
||||||
|
found = try_exts(path, pathlen);
|
||||||
|
}
|
||||||
if (!found && albumlen > 0)
|
if (!found && albumlen > 0)
|
||||||
{
|
{
|
||||||
/* if it doesn't exist,
|
/* if it doesn't exist,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue