summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index f4626356cb..cbd8eeb6a2 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -78,8 +78,12 @@ char* playlist_next(int steps)
78 char *dir_end; 78 char *dir_end;
79 79
80 playlist.index = (playlist.index+steps) % playlist.amount; 80 playlist.index = (playlist.index+steps) % playlist.amount;
81 if ( playlist.index < 0 ) 81 if ( playlist.index < 0 ) {
82 playlist.index = 0; 82 if ( global_settings.loop_playlist )
83 playlist.index += playlist.amount;
84 else
85 playlist.index = 0;
86 }
83 seek = playlist.indices[playlist.index]; 87 seek = playlist.indices[playlist.index];
84 88
85 if(playlist.in_ram) 89 if(playlist.in_ram)