From 01e0dd50ad4c5c4f9f8ac7b33e50cf749c93f85a Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Wed, 23 Feb 2022 00:53:39 +0300 Subject: [PATCH] Added serviceId check while comparing PlayQueues --- .../org/schabi/newpipe/player/playqueue/PlayQueue.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java index 750564ce2..f46c9d72f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java @@ -532,8 +532,11 @@ public abstract class PlayQueue implements Serializable { return false; } for (int i = 0; i < size(); i++) { - // Check is based on URL - if (!streams.get(i).getUrl().equals(other.streams.get(i).getUrl())) { + final PlayQueueItem stream = streams.get(i); + final PlayQueueItem otherStream = other.streams.get(i); + // Check is based on serviceId and URL + if (stream.getServiceId() != otherStream.getServiceId() + || !stream.getUrl().equals(otherStream.getUrl())) { return false; } }