mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-10 06:14:35 -05:00
Add batch endpoint for removing downloads from download queue (#452)
This commit is contained in:
@@ -134,6 +134,28 @@ object DownloadController {
|
||||
}
|
||||
)
|
||||
|
||||
/** delete multiple chapters from download queue */
|
||||
val unqueueChapters = handler(
|
||||
documentWith = {
|
||||
withOperation {
|
||||
summary("Downloader remove multiple downloads")
|
||||
description("Remove multiple chapters downloads from queue")
|
||||
}
|
||||
body<EnqueueInput>()
|
||||
},
|
||||
behaviorOf = { ctx ->
|
||||
val input = json.decodeFromString<EnqueueInput>(ctx.body())
|
||||
ctx.future(
|
||||
future {
|
||||
DownloadManager.unqueue(input)
|
||||
}
|
||||
)
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
}
|
||||
)
|
||||
|
||||
/** delete chapter from download queue */
|
||||
val unqueueChapter = handler(
|
||||
pathParam<Int>("chapterIndex"),
|
||||
|
||||
Reference in New Issue
Block a user