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