diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/wps-display.c | 7 | ||||
-rw-r--r-- | apps/wps.c | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index acb839ea50..cc8009ec5c 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -414,7 +414,12 @@ static char* get_tag(struct mp3entry* id3, | |||
414 | #endif | 414 | #endif |
415 | case 'p': /* Playlist Position */ | 415 | case 'p': /* Playlist Position */ |
416 | *flags |= WPS_REFRESH_STATIC; | 416 | *flags |= WPS_REFRESH_STATIC; |
417 | snprintf(buf, buf_size, "%d", id3->index + 1); | 417 | { |
418 | int index = id3->index - playlist_first_index(); | ||
419 | if (index < 0) | ||
420 | index += playlist_amount(); | ||
421 | snprintf(buf, buf_size, "%d", index + 1); | ||
422 | } | ||
418 | return buf; | 423 | return buf; |
419 | 424 | ||
420 | case 'n': /* Playlist Name (without path) */ | 425 | case 'n': /* Playlist Name (without path) */ |
diff --git a/apps/wps.c b/apps/wps.c index 7a22e1cc35..c5a27d9e9d 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -223,8 +223,13 @@ bool browse_id3(void) | |||
223 | 223 | ||
224 | case 7: | 224 | case 7: |
225 | lcd_puts(0, 0, str(LANG_ID3_PLAYLIST)); | 225 | lcd_puts(0, 0, str(LANG_ID3_PLAYLIST)); |
226 | snprintf(scroll_text,sizeof(scroll_text), "%d/%d", | 226 | { |
227 | id3->index + 1, playlist_amount()); | 227 | int index = id3->index - playlist_first_index(); |
228 | if (index < 0) | ||
229 | index += playlist_amount(); | ||
230 | snprintf(scroll_text,sizeof(scroll_text), "%d/%d", | ||
231 | index + 1, playlist_amount()); | ||
232 | } | ||
228 | lcd_puts_scroll(0, 1, scroll_text); | 233 | lcd_puts_scroll(0, 1, scroll_text); |
229 | break; | 234 | break; |
230 | 235 | ||