Merge pull request #2724 from Bnyro/master

Fix duplicated videos in the playing queue
This commit is contained in:
Bnyro 2023-01-16 20:02:36 +01:00 committed by GitHub
commit 69bdb2042b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,11 @@ object PlayingQueue {
fun clear() = queue.clear() fun clear() = queue.clear()
fun add(vararg streamItem: StreamItem) { fun add(vararg streamItem: StreamItem) {
streamItem.forEach { for (stream in streamItem) {
if (currentStream != it) { if (currentStream?.url?.toID() == stream.url?.toID()) continue
if (queue.contains(it)) queue.remove(it) // remove if already present
queue.add(it) queue.remove(stream)
} queue.add(stream)
} }
} }