summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c7
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) */