mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 15:34:17 +01:00
fix(api): library scan is always highest priority
This commit is contained in:
parent
e628b7ea8f
commit
e60acb86ff
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package org.gotson.komga.interfaces.api.rest
|
||||
|
||||
import org.gotson.komga.application.tasks.HIGHEST_PRIORITY
|
||||
import org.gotson.komga.application.tasks.HIGH_PRIORITY
|
||||
import org.gotson.komga.application.tasks.TaskReceiver
|
||||
import org.gotson.komga.domain.model.DirectoryNotFoundException
|
||||
|
|
@ -161,7 +162,7 @@ class LibraryController(
|
|||
@ResponseStatus(HttpStatus.ACCEPTED)
|
||||
fun scan(@PathVariable libraryId: String) {
|
||||
libraryRepository.findByIdOrNull(libraryId)?.let { library ->
|
||||
taskReceiver.scanLibrary(library.id)
|
||||
taskReceiver.scanLibrary(library.id, HIGHEST_PRIORITY)
|
||||
} ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue