summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c8
-rw-r--r--apps/playlist.h1
-rw-r--r--apps/wps.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 165c13847b..ebe82cc457 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -378,6 +378,14 @@ int playlist_next(int steps)
378 return index; 378 return index;
379} 379}
380 380
381/* Returns false if 'steps' is out of bounds, else true */
382bool playlist_check(int steps)
383{
384 bool queue;
385 int index = get_next_index(steps, &queue);
386 return (index >= 0);
387}
388
381char* playlist_peek(int steps) 389char* playlist_peek(int steps)
382{ 390{
383 int seek; 391 int seek;
diff --git a/apps/playlist.h b/apps/playlist.h
index 57a23f2a8f..ea77886bb7 100644
--- a/apps/playlist.h
+++ b/apps/playlist.h
@@ -55,6 +55,7 @@ int play_list(char *dir, char *file, int start_index,
55char* playlist_peek(int steps); 55char* playlist_peek(int steps);
56char* playlist_name(char *name, int name_size); 56char* playlist_name(char *name, int name_size);
57int playlist_next(int steps); 57int playlist_next(int steps);
58bool playlist_check(int steps);
58void randomise_playlist( unsigned int seed ); 59void randomise_playlist( unsigned int seed );
59void sort_playlist(bool start_current); 60void sort_playlist(bool start_current);
60void add_indices_to_playlist(void); 61void add_indices_to_playlist(void);
diff --git a/apps/wps.c b/apps/wps.c
index fded51fe13..0fbe8d713e 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -915,7 +915,6 @@ int wps_show(void)
915 break; 915 break;
916#endif 916#endif
917 if (!id3 || (id3->elapsed < 3*1000)) { 917 if (!id3 || (id3->elapsed < 3*1000)) {
918 mpeg_stop();
919 mpeg_prev(); 918 mpeg_prev();
920 } 919 }
921 else { 920 else {
@@ -935,7 +934,6 @@ int wps_show(void)
935 if ( lastbutton != BUTTON_RIGHT ) 934 if ( lastbutton != BUTTON_RIGHT )
936 break; 935 break;
937#endif 936#endif
938 mpeg_stop();
939 mpeg_next(); 937 mpeg_next();
940 break; 938 break;
941 939