summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/apps/wps.c b/apps/wps.c
index d2c3676d6f..e2c091fa81 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -191,13 +191,24 @@ static void draw_screen(struct mp3entry* id3)
191 case PLAY_DISPLAY_1LINEID3: 191 case PLAY_DISPLAY_1LINEID3:
192 { 192 {
193 char buffer[64]; 193 char buffer[64];
194 char ch = '/';
195 char* szLast = strrchr(id3->path, ch);
194 196
195 snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s", 197 if(id3->artist && id3->title)
196 id3->index + 1, 198 {
197 playlist.amount, 199 snprintf(buffer, sizeof(buffer), "%d/%d: %s - %s",
198 id3->artist?id3->artist:"<no artist>", 200 id3->index + 1,
199 id3->title?id3->title:"<no title>"); 201 playlist.amount,
200 202 id3->artist?id3->artist:"<no artist>",
203 id3->title?id3->title:"<no title>");
204 }
205 else
206 {
207 snprintf(buffer, sizeof(buffer), "%d/%d: %s",
208 id3->index + 1,
209 playlist.amount,
210 szLast?++szLast:id3->path);
211 }
201 lcd_puts_scroll(0, 0, buffer); 212 lcd_puts_scroll(0, 0, buffer);
202 break; 213 break;
203 } 214 }