mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 04:22:28 +02: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
|
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.HIGH_PRIORITY
|
||||||
import org.gotson.komga.application.tasks.TaskReceiver
|
import org.gotson.komga.application.tasks.TaskReceiver
|
||||||
import org.gotson.komga.domain.model.DirectoryNotFoundException
|
import org.gotson.komga.domain.model.DirectoryNotFoundException
|
||||||
|
|
@ -161,7 +162,7 @@ class LibraryController(
|
||||||
@ResponseStatus(HttpStatus.ACCEPTED)
|
@ResponseStatus(HttpStatus.ACCEPTED)
|
||||||
fun scan(@PathVariable libraryId: String) {
|
fun scan(@PathVariable libraryId: String) {
|
||||||
libraryRepository.findByIdOrNull(libraryId)?.let { library ->
|
libraryRepository.findByIdOrNull(libraryId)?.let { library ->
|
||||||
taskReceiver.scanLibrary(library.id)
|
taskReceiver.scanLibrary(library.id, HIGHEST_PRIORITY)
|
||||||
} ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
} ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue