summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index eb8facdf1a..058dcfe88c 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -30,6 +30,7 @@
30#include "settings.h" 30#include "settings.h"
31#include "status.h" 31#include "status.h"
32#include "applimits.h" 32#include "applimits.h"
33#include "screens.h"
33#ifdef HAVE_LCD_BITMAP 34#ifdef HAVE_LCD_BITMAP
34#include "icons.h" 35#include "icons.h"
35#include "widgets.h" 36#include "widgets.h"
@@ -545,10 +546,7 @@ int play_list(char *dir, /* "current directory" */
545 546
546 /* If file is NULL, the list is in RAM */ 547 /* If file is NULL, the list is in RAM */
547 if(file) { 548 if(file) {
548 lcd_clear_display(); 549 splash(0, 0, true, str(LANG_PLAYLIST_LOAD));
549 lcd_puts(0,0,str(LANG_PLAYLIST_LOAD));
550 status_draw();
551 lcd_update();
552 playlist.in_ram = false; 550 playlist.in_ram = false;
553 } else { 551 } else {
554 /* Assign a dummy filename */ 552 /* Assign a dummy filename */
@@ -576,9 +574,7 @@ int play_list(char *dir, /* "current directory" */
576 574
577 if(global_settings.playlist_shuffle) { 575 if(global_settings.playlist_shuffle) {
578 if(!playlist.in_ram) { 576 if(!playlist.in_ram) {
579 lcd_puts(0,0,str(LANG_PLAYLIST_SHUFFLE)); 577 splash(0, 0, true, str(LANG_PLAYLIST_SHUFFLE));
580 status_draw();
581 lcd_update();
582 randomise_playlist( random_seed ); 578 randomise_playlist( random_seed );
583 } 579 }
584 else { 580 else {
@@ -623,11 +619,6 @@ int play_list(char *dir, /* "current directory" */
623 } 619 }
624 } 620 }
625 621
626 if(!playlist.in_ram) {
627 lcd_puts(0,0,str(LANG_PLAYLIST_PLAY));
628 status_draw();
629 lcd_update();
630 }
631 /* also make the first song get playing */ 622 /* also make the first song get playing */
632 mpeg_play(start_offset); 623 mpeg_play(start_offset);
633 624
@@ -643,12 +634,10 @@ void add_indices_to_playlist(void)
643 int fd = -1; 634 int fd = -1;
644 int i = 0; 635 int i = 0;
645 int count = 0; 636 int count = 0;
646 int next_tick = current_tick + HZ;
647 unsigned char* buffer = playlist_buffer; 637 unsigned char* buffer = playlist_buffer;
648 int buflen = PLAYLIST_BUFFER_SIZE; 638 int buflen = PLAYLIST_BUFFER_SIZE;
649 bool store_index; 639 bool store_index;
650 unsigned char *p; 640 unsigned char *p;
651 char line[16];
652 641
653 if(!playlist.in_ram) { 642 if(!playlist.in_ram) {
654 fd = open(playlist.filename, O_RDONLY); 643 fd = open(playlist.filename, O_RDONLY);
@@ -708,19 +697,6 @@ void add_indices_to_playlist(void)
708 697
709 return; 698 return;
710 } 699 }
711
712 /* Update the screen if it takes very long */
713 if(!playlist.in_ram) {
714 if ( current_tick >= next_tick ) {
715 next_tick = current_tick + HZ;
716 snprintf(line, sizeof line,
717 str(LANG_PLAYINDICES_AMOUNT),
718 playlist.amount);
719 lcd_puts(0,1,line);
720 status_draw();
721 lcd_update();
722 }
723 }
724 } 700 }
725 } 701 }
726 } 702 }
@@ -730,14 +706,9 @@ void add_indices_to_playlist(void)
730 if(playlist.in_ram) 706 if(playlist.in_ram)
731 break; 707 break;
732 } 708 }
733 if(!playlist.in_ram) { 709
734 snprintf(line, sizeof line, str(LANG_PLAYINDICES_AMOUNT), 710 if(!playlist.in_ram)
735 playlist.amount);
736 lcd_puts(0,1,line);
737 status_draw();
738 lcd_update();
739 close(fd); 711 close(fd);
740 }
741} 712}
742 713
743/* 714/*