mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 15:42:28 -05:00
Fixed %pp for shuffled dirs (patch #700465)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3726 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
56f771e76a
commit
7bc69aa084
2 changed files with 13 additions and 3 deletions
|
|
@ -414,7 +414,12 @@ static char* get_tag(struct mp3entry* id3,
|
||||||
#endif
|
#endif
|
||||||
case 'p': /* Playlist Position */
|
case 'p': /* Playlist Position */
|
||||||
*flags |= WPS_REFRESH_STATIC;
|
*flags |= WPS_REFRESH_STATIC;
|
||||||
snprintf(buf, buf_size, "%d", id3->index + 1);
|
{
|
||||||
|
int index = id3->index - playlist_first_index();
|
||||||
|
if (index < 0)
|
||||||
|
index += playlist_amount();
|
||||||
|
snprintf(buf, buf_size, "%d", index + 1);
|
||||||
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
case 'n': /* Playlist Name (without path) */
|
case 'n': /* Playlist Name (without path) */
|
||||||
|
|
|
||||||
|
|
@ -223,8 +223,13 @@ bool browse_id3(void)
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
lcd_puts(0, 0, str(LANG_ID3_PLAYLIST));
|
lcd_puts(0, 0, str(LANG_ID3_PLAYLIST));
|
||||||
snprintf(scroll_text,sizeof(scroll_text), "%d/%d",
|
{
|
||||||
id3->index + 1, playlist_amount());
|
int index = id3->index - playlist_first_index();
|
||||||
|
if (index < 0)
|
||||||
|
index += playlist_amount();
|
||||||
|
snprintf(scroll_text,sizeof(scroll_text), "%d/%d",
|
||||||
|
index + 1, playlist_amount());
|
||||||
|
}
|
||||||
lcd_puts_scroll(0, 1, scroll_text);
|
lcd_puts_scroll(0, 1, scroll_text);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue