Changed order
This commit is contained in:
parent
9424f25dcc
commit
a4c1b6978d
@ -23,13 +23,9 @@ class UnattendedIndexing {
|
||||
@Scheduled(fixedDelay = 60_000*60)
|
||||
fun indexContent() {
|
||||
logger.info { "Performing indexing of input root: ${SharedConfig.inputRoot.absolutePath}" }
|
||||
val foundFiles: MutableList<File> = mutableListOf()
|
||||
SharedConfig.inputRoot.walkTopDown().filter { it.isFile && it.isSupportedVideoFile() }.also {
|
||||
foundFiles.addAll(it)
|
||||
}
|
||||
|
||||
val fileList = SharedConfig.inputRoot.walkTopDown().filter { it.isFile && it.isSupportedVideoFile() }
|
||||
fileList.forEach { file ->
|
||||
withTransaction(eventDatabase.database) {
|
||||
foundFiles.forEach { file ->
|
||||
files.insertIgnore {
|
||||
it[this.fileName] = file.absolutePath
|
||||
it[this.baseName] = file.nameWithoutExtension
|
||||
|
||||
Loading…
Reference in New Issue
Block a user