summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-09-13 18:39:40 +0200
committerGravatar waker <wakeroid@gmail.com>2012-09-13 18:39:40 +0200
commit4329eb94c148cb7c0dca339172b3ed46c1641291 (patch)
tree151b2db8c11f52d8da9dfd7507c799f3575484c6
parent0d3e694f5380a59547a935d4f15acbdeb01f5263 (diff)
fixed resuming in shuffle-albums mode
-rw-r--r--main.c7
-rw-r--r--playlist.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/main.c b/main.c
index 228e3ecb..466126df 100644
--- a/main.c
+++ b/main.c
@@ -676,6 +676,13 @@ restore_resume_state (void) {
streamer_lock (); // need to hold streamer thread to make the resume operation atomic
streamer_set_current_playlist (plt);
streamer_set_nextsong (track, paused ? 2 : 3);
+ if (pl_get_order () == PLAYBACK_ORDER_SHUFFLE_ALBUMS) {
+ playlist_t *p = plt_get_for_idx (plt);
+ if (p) {
+ plt_init_shuffle_albums (p, track);
+ plt_unref (p);
+ }
+ }
streamer_set_seek (pos);
streamer_unlock ();
}
diff --git a/playlist.c b/playlist.c
index 6078e60f..cbcc1e03 100644
--- a/playlist.c
+++ b/playlist.c
@@ -3812,7 +3812,7 @@ pl_get_playlist (playItem_t *it) {
return NULL;
}
-// this function must be called user starts track manually in shuffle albums mode
+// this function must be called when the user starts track manually in shuffle albums mode
// r is an index of current track
// mark previous songs in the album as played
void