1
0
Fork 0
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:
Justin Heiner 2002-08-19 08:11:23 +00:00
parent 8c78975300
commit c0ea4a7d1d

View file

@ -191,13 +191,24 @@ static void draw_screen(struct mp3entry* id3)
case PLAY_DISPLAY_1LINEID3:
{
char buffer[64];
char ch = '/';
char* szLast = strrchr(id3->path, ch);
snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s",
id3->index + 1,
playlist.amount,
id3->artist?id3->artist:"<no artist>",
id3->title?id3->title:"<no title>");
if(id3->artist && id3->title)
{
snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s",
id3->index + 1,
playlist.amount,
id3->artist?id3->artist:"<no artist>",
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);
break;
}