mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-13 07:44:34 -05:00
Add batch endpoint for removing downloads from download queue (#452)
This commit is contained in:
@@ -190,6 +190,14 @@ object DownloadManager {
|
||||
addMultipleToQueue(inputPairs)
|
||||
}
|
||||
|
||||
fun unqueue(input: EnqueueInput) {
|
||||
if (input.chapterIds.isNullOrEmpty()) return
|
||||
|
||||
downloadQueue.removeIf { it.chapter.id in input.chapterIds }
|
||||
|
||||
notifyAllClients()
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to add multiple inputs to queue
|
||||
* If any of inputs was actually added to queue, starts the queue
|
||||
|
||||
Reference in New Issue
Block a user