issue:1336 Remove auto queued stream if a new stream gets appended

This commit is contained in:
shivanju 2018-11-24 17:20:57 +05:30
parent 84976a65e0
commit 5bbb0cd666
1 changed files with 2 additions and 3 deletions

View File

@ -234,10 +234,9 @@ public abstract class PlayQueue implements Serializable {
Collections.shuffle(itemList); Collections.shuffle(itemList);
} }
if (!streams.isEmpty() && streams.get(streams.size() - 1).isAutoQueued() && !itemList.get(0).isAutoQueued()) { if (!streams.isEmpty() && streams.get(streams.size() - 1).isAutoQueued() && !itemList.get(0).isAutoQueued()) {
streams.addAll(streams.size() - 1, itemList); streams.remove(streams.size() - 1);
} else {
streams.addAll(itemList);
} }
streams.addAll(itemList);
broadcast(new AppendEvent(itemList.size())); broadcast(new AppendEvent(itemList.size()));
} }