From 7c7436da5f2e7d230e379c444c77298b99ed90ac Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 16:35:59 +0200 Subject: after switching to shuffle-albums mode, while playing a track, mark all previous album tracks as played --- playlist.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'playlist.c') diff --git a/playlist.c b/playlist.c index f83cc480..3a2ebf45 100644 --- a/playlist.c +++ b/playlist.c @@ -105,7 +105,7 @@ static playlist_t dummy_playlist = { .refc = 1 }; -static int pl_order; // mirrors "playback.order" config variable +static int pl_order = -1; // mirrors "playback.order" config variable static int no_remove_notify; @@ -113,12 +113,16 @@ static playlist_t *addfiles_playlist; // current playlist for adding files/folde void pl_set_order (int order) { - if (pl_order != order || pl_order == PLAYBACK_ORDER_SHUFFLE_TRACKS || pl_order == PLAYBACK_ORDER_SHUFFLE_ALBUMS) { + int prev_order = pl_order; + + if (pl_order != order) { pl_order = order; for (playlist_t *plt = playlists_head; plt; plt = plt->next) { plt_reshuffle (plt, NULL, NULL); } } + + streamer_notify_order_changed (prev_order, pl_order); } int -- cgit v1.2.3