diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-06 09:22:55 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-06 09:22:55 +0000 |
commit | 49f2709a01f6ea6230804c0787785b0f5569ca02 (patch) | |
tree | 7619ba1afc878b37c189f01f2fbb6797546427bf /apps/gui/skin_engine/skin_display.c | |
parent | 0defb8483c817f18f5ee118bdfb48bc8910b523e (diff) | |
download | rockbox-49f2709a01f6ea6230804c0787785b0f5569ca02.tar.gz rockbox-49f2709a01f6ea6230804c0787785b0f5569ca02.zip |
If dircache and database "load to ram" is enabled then get the id3 info from the database in the WPS playlist viewer for non buffered tracks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25841 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 4d7b264efa..0d7824aaf6 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "screen_access.h" | 40 | #include "screen_access.h" |
41 | #include "playlist.h" | 41 | #include "playlist.h" |
42 | #include "audio.h" | 42 | #include "audio.h" |
43 | #include "tagcache.h" | ||
43 | 44 | ||
44 | #ifdef HAVE_LCD_BITMAP | 45 | #ifdef HAVE_LCD_BITMAP |
45 | #include "peakmeter.h" | 46 | #include "peakmeter.h" |
@@ -198,10 +199,12 @@ static void draw_playlist_viewer_list(struct gui_wps *gwps, | |||
198 | 199 | ||
199 | struct mp3entry *pid3; | 200 | struct mp3entry *pid3; |
200 | char buf[MAX_PATH*2], tempbuf[MAX_PATH]; | 201 | char buf[MAX_PATH*2], tempbuf[MAX_PATH]; |
202 | char *filename; | ||
201 | 203 | ||
202 | gwps->display->set_viewport(viewer->vp); | 204 | gwps->display->set_viewport(viewer->vp); |
203 | for(i=start_item; (i-start_item)<lines && i<=playlist_amount(); i++) | 205 | for(i=start_item; (i-start_item)<lines && i<=playlist_amount(); i++) |
204 | { | 206 | { |
207 | filename = playlist_peek(i-cur_playlist_pos); | ||
205 | if (i == cur_playlist_pos) | 208 | if (i == cur_playlist_pos) |
206 | { | 209 | { |
207 | pid3 = state->id3; | 210 | pid3 = state->id3; |
@@ -213,8 +216,15 @@ static void draw_playlist_viewer_list(struct gui_wps *gwps, | |||
213 | #if CONFIG_CODEC == SWCODEC | 216 | #if CONFIG_CODEC == SWCODEC |
214 | else if (i>cur_playlist_pos) | 217 | else if (i>cur_playlist_pos) |
215 | { | 218 | { |
216 | if (!audio_peek_track(&pid3, i-cur_playlist_pos)) | 219 | #ifdef HAVE_TC_RAMCACHE |
217 | pid3 = NULL; | 220 | if (tagcache_fill_tags(&viewer->tempid3, filename)) |
221 | { | ||
222 | pid3 = &viewer->tempid3; | ||
223 | } | ||
224 | else | ||
225 | #endif | ||
226 | if (!audio_peek_track(&pid3, i-cur_playlist_pos)) | ||
227 | pid3 = NULL; | ||
218 | } | 228 | } |
219 | #endif | 229 | #endif |
220 | else | 230 | else |
@@ -224,7 +234,6 @@ static void draw_playlist_viewer_list(struct gui_wps *gwps, | |||
224 | 234 | ||
225 | int line = pid3 ? TRACK_HAS_INFO : TRACK_HAS_NO_INFO; | 235 | int line = pid3 ? TRACK_HAS_INFO : TRACK_HAS_NO_INFO; |
226 | int j = 0, cur_string = 0; | 236 | int j = 0, cur_string = 0; |
227 | char *filename = playlist_peek(i-cur_playlist_pos); | ||
228 | unsigned int line_len = 0; | 237 | unsigned int line_len = 0; |
229 | buf[0] = '\0'; | 238 | buf[0] = '\0'; |
230 | while (j < viewer->lines[line].count && line_len < sizeof(buf)) | 239 | while (j < viewer->lines[line].count && line_len < sizeof(buf)) |