summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-06-23 21:34:27 +0200
committerGravatar waker <wakeroid@gmail.com>2011-06-23 21:34:27 +0200
commit17c344f5a0f97c54072afccadfe6f0b810bc8aad (patch)
treeeac1e8dec6dc2e2f0d73bfb3eb6ef1b2c8dde6ba /streamer.c
parent2e702e0996c847d97d1f514d729c9f6932889804 (diff)
fixed shuffle tracks bug, when part of the tracks were skipped
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/streamer.c b/streamer.c
index 74398e34..1acf72b3 100644
--- a/streamer.c
+++ b/streamer.c
@@ -386,7 +386,7 @@ streamer_move_to_nextsong (int reason) {
}
if (pl_order == PLAYBACK_ORDER_SHUFFLE_TRACKS || pl_order == PLAYBACK_ORDER_SHUFFLE_ALBUMS) { // shuffle
- if (!curr) {
+ if (!curr || pl_order == PLAYBACK_ORDER_SHUFFLE_TRACKS) {
// find minimal notplayed
playItem_t *pmin = NULL; // notplayed minimum
for (playItem_t *i = plt->head[PL_MAIN]; i; i = i->next[PL_MAIN]) {
@@ -405,7 +405,12 @@ streamer_move_to_nextsong (int reason) {
}
}
if (!it) {
+ streamer_buffering = 0;
+ send_trackinfochanged (streaming_track);
+ playItem_t *temp;
+ plt_reshuffle (streamer_playlist, &temp, NULL);
pl_unlock ();
+ streamer_set_nextsong (-2, -2);
return -1;
}
int r = str_get_idx_of (it);