forked from len0rd/rockbox
Added Smart(tm) ID3 displaying to the new 1 Line ID3. If no ID3 is available, it will display the filename instead
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1796 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8c78975300
commit
c0ea4a7d1d
1 changed files with 17 additions and 6 deletions
13
apps/wps.c
13
apps/wps.c
|
@ -191,13 +191,24 @@ static void draw_screen(struct mp3entry* id3)
|
||||||
case PLAY_DISPLAY_1LINEID3:
|
case PLAY_DISPLAY_1LINEID3:
|
||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
|
char ch = '/';
|
||||||
|
char* szLast = strrchr(id3->path, ch);
|
||||||
|
|
||||||
|
if(id3->artist && id3->title)
|
||||||
|
{
|
||||||
snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s",
|
snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s",
|
||||||
id3->index + 1,
|
id3->index + 1,
|
||||||
playlist.amount,
|
playlist.amount,
|
||||||
id3->artist?id3->artist:"<no artist>",
|
id3->artist?id3->artist:"<no artist>",
|
||||||
id3->title?id3->title:"<no title>");
|
id3->title?id3->title:"<no title>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf(buffer, sizeof(buffer), "%d/%d: %s",
|
||||||
|
id3->index + 1,
|
||||||
|
playlist.amount,
|
||||||
|
szLast?++szLast:id3->path);
|
||||||
|
}
|
||||||
lcd_puts_scroll(0, 0, buffer);
|
lcd_puts_scroll(0, 0, buffer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue