diff options
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 15 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 3 |
2 files changed, 15 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)) |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index edfae68e84..211d9a13ee 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -241,6 +241,9 @@ struct playlistviewer { | |||
241 | struct viewport *vp; | 241 | struct viewport *vp; |
242 | bool show_icons; | 242 | bool show_icons; |
243 | int start_offset; | 243 | int start_offset; |
244 | #ifdef HAVE_TC_RAMCACHE | ||
245 | struct mp3entry tempid3; | ||
246 | #endif | ||
244 | struct { | 247 | struct { |
245 | enum wps_token_type tokens[MAX_PLAYLISTLINE_TOKENS]; | 248 | enum wps_token_type tokens[MAX_PLAYLISTLINE_TOKENS]; |
246 | char strings[MAX_PLAYLISTLINE_STRINGS][MAX_PLAYLISTLINE_STRLEN]; | 249 | char strings[MAX_PLAYLISTLINE_STRINGS][MAX_PLAYLISTLINE_STRLEN]; |