summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--playlist.c11
-rw-r--r--streamer.c11
-rw-r--r--streamer.h3
3 files changed, 25 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;
}
diff --git a/streamer.c b/streamer.c
index f52ae450..2f1d819a 100644
--- a/streamer.c
+++ b/streamer.c
@@ -2299,3 +2299,14 @@ streamer_notify_order_changed (int prev_order, int new_order) {
streamer_unlock ();
}
}
+
+void
+streamer_set_streamer_playlist (playlist_t *plt) {
+ if (streamer_playlist) {
+ plt_unref (streamer_playlist);
+ }
+ streamer_playlist = plt;
+ if (streamer_playlist) {
+ plt_ref (streamer_playlist);
+ }
+}
diff --git a/streamer.h b/streamer.h
index 6b77f382..53c9c870 100644
--- a/streamer.h
+++ b/streamer.h
@@ -130,4 +130,7 @@ streamer_dsp_chain_save (void);
void
streamer_notify_order_changed (int prev_order, int new_order);
+void
+streamer_set_streamer_playlist (playlist_t *plt);
+
#endif // __STREAMER_H