summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-28 04:14:56 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-28 04:14:56 +0000
commit34589f6ccb19f2689255226fd8ee5fc612d5e632 (patch)
treeb0371fcf92cd2579df65fc5160202277aaf90880 /apps/plugins
parentdda7580f8a1778e805bb22cd083fa5aea51fe62f (diff)
downloadrockbox-34589f6ccb19f2689255226fd8ee5fc612d5e632.tar.gz
rockbox-34589f6ccb19f2689255226fd8ee5fc612d5e632.zip
Suggested by Thomas Martitz, use tagcache_fill_tags to speed up PictureFlow album art search a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21110 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index cd12152d43..2baea2a730 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -879,9 +879,19 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf,
struct mp3entry id3;
int fd;
- fd = rb->open(tcs.result, O_RDONLY);
- rb->get_metadata(&id3, fd, tcs.result);
- rb->close(fd);
+#ifdef HAVE_TC_RAMCACHE
+ if (rb->tagcache_fill_tags(&id3, tcs.result))
+ {
+ rb->strncpy(id3.path, tcs.result, sizeof(id3.path));
+ id3.path[sizeof(id3.path) - 1] = 0;
+ }
+ else
+#endif
+ {
+ fd = rb->open(tcs.result, O_RDONLY);
+ rb->get_metadata(&id3, fd, tcs.result);
+ rb->close(fd);
+ }
if ( search_albumart_files(&id3, "", buf, buflen) )
result = true;
else