summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-20 19:21:55 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-20 19:21:55 +0200
commit677a6e08e3c47de72257ccd03c75a07c4cd63812 (patch)
tree951c76ac5379489023938df5094adf3eed605bb8
parentb27d52578f21130ba5480e44468427528be53b17 (diff)
fixed reshuffling playlist that is not current
-rw-r--r--playlist.c8
-rw-r--r--playlist.h3
-rw-r--r--streamer.c4
3 files changed, 11 insertions, 4 deletions
diff --git a/playlist.c b/playlist.c
index 24a88729..e4cdaa96 100644
--- a/playlist.c
+++ b/playlist.c
@@ -2115,9 +2115,8 @@ pl_select_all (void) {
GLOBAL_UNLOCK;
}
-
void
-pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax) {
+plt_reshuffle (playlist_t *playlist, playItem_t **ppmin, playItem_t **ppmax) {
GLOBAL_LOCK;
playItem_t *pmin = NULL;
playItem_t *pmax = NULL;
@@ -2141,6 +2140,11 @@ pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax) {
}
void
+pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax) {
+ plt_reshuffle (playlist, ppmin, ppmax);
+}
+
+void
pl_delete_all_meta (playItem_t *it) {
LOCK;
while (it->meta) {
diff --git a/playlist.h b/playlist.h
index abd9fc03..2b5d24df 100644
--- a/playlist.h
+++ b/playlist.h
@@ -225,6 +225,9 @@ void
pl_select_all (void);
void
+plt_reshuffle (playlist_t *playlist, playItem_t **ppmin, playItem_t **ppmax);
+
+void
pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax);
// required to calculate total playtime
diff --git a/streamer.c b/streamer.c
index 65d43cf2..94d35f98 100644
--- a/streamer.c
+++ b/streamer.c
@@ -232,7 +232,7 @@ streamer_move_to_nextsong (int reason) {
if (!it) {
// all songs played, reshuffle and try again
if (pl_loop_mode == PLAYBACK_MODE_LOOP_ALL) { // loop
- pl_reshuffle (&it, NULL);
+ plt_reshuffle (streamer_playlist, &it, NULL);
}
}
if (!it) {
@@ -268,7 +268,7 @@ streamer_move_to_nextsong (int reason) {
trace ("all songs played! reshuffle\n");
// all songs played, reshuffle and try again
if (pl_loop_mode == PLAYBACK_MODE_LOOP_ALL) { // loop
- pl_reshuffle (&it, NULL);
+ plt_reshuffle (streamer_playlist, &it, NULL);
}
}
if (!it) {