summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Jackson <rdjackso@rockbox.org>2005-07-30 19:36:06 +0000
committerRyan Jackson <rdjackso@rockbox.org>2005-07-30 19:36:06 +0000
commit1476fecf728f878caa56ae37a494927425e6c5df (patch)
treef88805116bd4714c4937b5ffb5d49b6fc5a7d725
parent05820cbc078efe8b0118e3d0f4579e5ddab8063f (diff)
downloadrockbox-1476fecf728f878caa56ae37a494927425e6c5df.zip
rockbox-1476fecf728f878caa56ae37a494927425e6c5df.tar.gz
rockbox-1476fecf728f878caa56ae37a494927425e6c5df.tar.bz2
rockbox-1476fecf728f878caa56ae37a494927425e6c5df.tar.xz
All repeat modes now work correctly if there is only one track in the playlist. Fixed a track-changing bug in 'Move to Next Folder' mode that could cause Rockbox to crash.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7268 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c7
-rw-r--r--apps/playlist.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 2220219..dd4270e 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1373,10 +1373,15 @@ void audio_invalidate_tracks(void)
static void initiate_track_change(int peek_index)
{
+ int repeat_mode = global_settings.repeat_mode;
+
if (!playlist_check(peek_index))
return ;
- if (global_settings.repeat_mode == REPEAT_ONE) {
+ /* Handle the special case of repeat mode and only
+ * one track, or REPEAT_ONE mode */
+ if ((repeat_mode == REPEAT_ONE) ||
+ ((repeat_mode != REPEAT_OFF) && (playlist_amount() == 1))) {
if (!paused)
pcm_play_pause(false);
diff --git a/apps/playlist.c b/apps/playlist.c
index d1c83f0..68fd8be 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1841,7 +1841,7 @@ bool playlist_check(int steps)
if (index < 0 && steps >= 0 &&
(global_settings.repeat_mode == REPEAT_SHUFFLE ||
- global_settings.next_folder))
+ (global_settings.next_folder && playlist->in_ram)))
/* shuffle repeat and move to next folder are the same as repeat all
for check purposes */
index = get_next_index(playlist, steps, REPEAT_ALL);