diff options
author | Justin Heiner <jheiner@rockbox.org> | 2002-08-19 08:11:23 +0000 |
---|---|---|
committer | Justin Heiner <jheiner@rockbox.org> | 2002-08-19 08:11:23 +0000 |
commit | c0ea4a7d1d6931b6ff034b5dae99add400b97eee (patch) | |
tree | 230eac6a046ab3419a1e70ac7b0a2fbd2eb5a590 | |
parent | 8c789753008408f05983b33c6df836cce842f40b (diff) | |
download | rockbox-c0ea4a7d1d6931b6ff034b5dae99add400b97eee.tar.gz rockbox-c0ea4a7d1d6931b6ff034b5dae99add400b97eee.zip |
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
-rw-r--r-- | apps/wps.c | 23 |
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 | } |