Commit db62c9f 1 parent 45b34f7 commit db62c9f Copy full SHA for db62c9f
File tree 1 file changed +7
-6
lines changed
server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -289,16 +289,17 @@ object DownloadManager {
289
289
290
290
fun dequeue (input : EnqueueInput ) {
291
291
if (input.chapterIds.isNullOrEmpty()) return
292
-
293
- downloadQueue.removeIf { it.chapter.id in input.chapterIds }
294
- saveDownloadQueue()
295
-
296
- notifyAllClients()
292
+ dequeue(downloadQueue.filter { it.chapter.id in input.chapterIds }.toSet())
297
293
}
298
294
299
295
fun dequeue (chapterIndex : Int , mangaId : Int ) {
300
- downloadQueue.removeIf { it.mangaId == mangaId && it.chapterIndex == chapterIndex }
296
+ dequeue(downloadQueue.filter { it.mangaId == mangaId && it.chapterIndex == chapterIndex }.toSet())
297
+ }
298
+
299
+ private fun dequeue (chapterDownloads : Set <DownloadChapter >) {
300
+ downloadQueue.removeAll(chapterDownloads)
301
301
saveDownloadQueue()
302
+
302
303
notifyAllClients()
303
304
}
304
305
You can’t perform that action at this time.
0 commit comments