diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-06-04 14:18:47 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-06-04 14:18:47 +0000 |
commit | 7bc69aa084fe3d0577303fbf6cf1569a19cde390 (patch) | |
tree | 754762563d72bfce2c1aea7a24e60a49e03e3c3b /apps/wps-display.c | |
parent | 56f771e76a8b7707553c472d08b745e45f79c64f (diff) | |
download | rockbox-7bc69aa084fe3d0577303fbf6cf1569a19cde390.tar.gz rockbox-7bc69aa084fe3d0577303fbf6cf1569a19cde390.zip |
Fixed %pp for shuffled dirs (patch #700465)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3726 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 7 |
1 files changed, 6 insertions, 1 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) */ |