Skip to content

Commit 01e0dd5

Browse files
committed
Added serviceId check while comparing PlayQueues
1 parent 835c5e9 commit 01e0dd5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,11 @@ public boolean equals(@Nullable final Object obj) {
532532
return false;
533533
}
534534
for (int i = 0; i < size(); i++) {
535-
// Check is based on URL
536-
if (!streams.get(i).getUrl().equals(other.streams.get(i).getUrl())) {
535+
final PlayQueueItem stream = streams.get(i);
536+
final PlayQueueItem otherStream = other.streams.get(i);
537+
// Check is based on serviceId and URL
538+
if (stream.getServiceId() != otherStream.getServiceId()
539+
|| !stream.getUrl().equals(otherStream.getUrl())) {
537540
return false;
538541
}
539542
}

0 commit comments

Comments
 (0)