summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-10-07 14:24:55 +0200
committerGravatar waker <wakeroid@gmail.com>2012-10-07 14:24:55 +0200
commit857b5d6aa589203770ff42e049288e982d8664a9 (patch)
tree5656bd0074038a816cb8648feab54ac5325c4c3d /playlist.c
parentdba664d4f00955b12a6cbdc2cc2aba86ead231fd (diff)
fixed updating streamer playlist after moving current playing track to another playlist
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index d998ca8a..fc000992 100644
--- a/playlist.c
+++ b/playlist.c
@@ -3473,9 +3473,14 @@ plt_move_items (playlist_t *to, int iter, playlist_t *from, playItem_t *drop_bef
drop_after = to->tail[iter];
}
+ playItem_t *playing = streamer_get_playing_track ();
+
for (playItem_t *it = from->head[iter]; it && processed < count; it = next, idx++) {
next = it->next[iter];
if (idx == indexes[processed]) {
+ if (it == playing && to != from) {
+ streamer_set_streamer_playlist (to);
+ }
pl_item_ref (it);
if (drop_after == it) {
drop_after = it->prev[PL_MAIN];
@@ -3487,6 +3492,12 @@ plt_move_items (playlist_t *to, int iter, playlist_t *from, playItem_t *drop_bef
processed++;
}
}
+
+ if (playing) {
+ pl_item_unref (playing);
+ }
+
+
no_remove_notify = 0;
UNLOCK;
}