diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-26 16:06:54 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-26 16:06:54 +0000 |
| commit | 890989d016b71ad51df90f7a609eb9ce6bb5a56b (patch) | |
| tree | f58257d4eee8dedbfbb3c69dfb909013de8bb58b | |
| parent | ed1a26d567b39f92d745af2973886b3b44a909b2 (diff) | |
| download | rockbox-890989d016b71ad51df90f7a609eb9ce6bb5a56b.zip rockbox-890989d016b71ad51df90f7a609eb9ce6bb5a56b.tar.gz rockbox-890989d016b71ad51df90f7a609eb9ce6bb5a56b.tar.bz2 rockbox-890989d016b71ad51df90f7a609eb9ce6bb5a56b.tar.xz | |
Runtime stats for WPS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10761 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/tagtree.c | 16 | ||||
| -rw-r--r-- | firmware/export/id3.h | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index 8b7182c..6602e9a 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -378,7 +378,23 @@ static void tagtree_buffer_event(struct mp3entry *id3, bool last_track) (void)id3; (void)last_track; + /* Do not gather data unless proper setting has been enabled. */ + if (!global_settings.runtimedb) + return; + logf("be:%d%s", last_track, id3->path); + + if (!tagcache_find_index(&tcs, id3->path)) + { + logf("tc stat: not found: %s", id3->path); + return; + } + + id3->playcount = tagcache_get_numeric(&tcs, tag_playcount); + id3->lastplayed = tagcache_get_numeric(&tcs, tag_lastplayed); + id3->rating = tagcache_get_numeric(&tcs, tag_virt_autoscore) / 10; + + tagcache_search_finish(&tcs); } static void tagtree_unbuffer_event(struct mp3entry *id3, bool last_track) diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 218db64..7930cd9 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h @@ -109,9 +109,7 @@ struct mp3entry { long rundbentryoffset; /* runtime database fields */ - long rundbhash; short rating; - short voladjust; long playcount; long lastplayed; |