diff options
-rw-r--r-- | apps/tree.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/tree.c b/apps/tree.c index d7cb7fbe33..9dae3229e2 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -278,14 +278,16 @@ static int showdir(char *path, int start) | |||
278 | #ifdef HAVE_LCD_BITMAP | 278 | #ifdef HAVE_LCD_BITMAP |
279 | if ( dircache[i].attr & ATTR_DIRECTORY ) | 279 | if ( dircache[i].attr & ATTR_DIRECTORY ) |
280 | icon_type = Folder; | 280 | icon_type = Folder; |
281 | else { | 281 | else if ( dircache[i].attr & TREE_ATTR_M3U ) |
282 | if ( dircache[i].attr & TREE_ATTR_M3U ) | 282 | icon_type = Playlist; |
283 | icon_type = Playlist; | 283 | else if ( dircache[i].attr & TREE_ATTR_MP3 ) |
284 | else | 284 | icon_type = File; |
285 | icon_type = File; | 285 | else |
286 | } | 286 | icon_type = 0; |
287 | lcd_bitmap(bitmap_icons_6x8[icon_type], | 287 | |
288 | 4, MARGIN_Y+(i-start)*line_height, 6, 8, true); | 288 | if (icon_type) |
289 | lcd_bitmap(bitmap_icons_6x8[icon_type], | ||
290 | 4, MARGIN_Y+(i-start)*line_height, 6, 8, true); | ||
289 | #endif | 291 | #endif |
290 | 292 | ||
291 | 293 | ||
@@ -526,7 +528,7 @@ bool dirbrowse(char *root) | |||
526 | 0, seed ); | 528 | 0, seed ); |
527 | start_index = 0; | 529 | start_index = 0; |
528 | } | 530 | } |
529 | else { | 531 | else if (dircache[dircursor+start].attr & TREE_ATTR_MP3 ) { |
530 | if ( global_settings.resume ) | 532 | if ( global_settings.resume ) |
531 | strncpy(global_settings.resume_file, | 533 | strncpy(global_settings.resume_file, |
532 | currdir, MAX_PATH); | 534 | currdir, MAX_PATH); |
@@ -537,6 +539,8 @@ bool dirbrowse(char *root) | |||
537 | start_index = play_list(currdir, NULL, | 539 | start_index = play_list(currdir, NULL, |
538 | start_index, false, 0, seed); | 540 | start_index, false, 0, seed); |
539 | } | 541 | } |
542 | else | ||
543 | break; | ||
540 | 544 | ||
541 | if ( global_settings.resume ) { | 545 | if ( global_settings.resume ) { |
542 | /* the resume_index must always be the index in the | 546 | /* the resume_index must always be the index in the |