mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-04-02 01:16:54 +02:00
Update scanner logs to show inode value on path changes and missing items #1447
This commit is contained in:
parent
557d3243c3
commit
db1ca08c2e
@ -336,6 +336,7 @@ class LibraryItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dataFound.ino !== this.ino) {
|
if (dataFound.ino !== this.ino) {
|
||||||
|
Logger.warn(`[LibraryItem] Check scan item changed inode "${this.ino}" -> "${dataFound.ino}"`)
|
||||||
this.ino = dataFound.ino
|
this.ino = dataFound.ino
|
||||||
hasUpdated = true
|
hasUpdated = true
|
||||||
}
|
}
|
||||||
@ -347,7 +348,7 @@ class LibraryItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dataFound.path !== this.path) {
|
if (dataFound.path !== this.path) {
|
||||||
Logger.warn(`[LibraryItem] Check scan item changed path "${this.path}" -> "${dataFound.path}"`)
|
Logger.warn(`[LibraryItem] Check scan item changed path "${this.path}" -> "${dataFound.path}" (inode ${this.ino})`)
|
||||||
this.path = dataFound.path
|
this.path = dataFound.path
|
||||||
this.relPath = dataFound.relPath
|
this.relPath = dataFound.relPath
|
||||||
hasUpdated = true
|
hasUpdated = true
|
||||||
|
@ -201,6 +201,7 @@ class Scanner {
|
|||||||
const dataFound = libraryItemDataFound.find(lid => lid.ino === libraryItem.ino || comparePaths(lid.relPath, libraryItem.relPath))
|
const dataFound = libraryItemDataFound.find(lid => lid.ino === libraryItem.ino || comparePaths(lid.relPath, libraryItem.relPath))
|
||||||
if (!dataFound) {
|
if (!dataFound) {
|
||||||
libraryScan.addLog(LogLevel.WARN, `Library Item "${libraryItem.media.metadata.title}" is missing`)
|
libraryScan.addLog(LogLevel.WARN, `Library Item "${libraryItem.media.metadata.title}" is missing`)
|
||||||
|
Logger.warn(`[Scanner] Library item "${libraryItem.media.metadata.title}" is missing (inode "${libraryItem.ino}")`)
|
||||||
libraryScan.resultsMissing++
|
libraryScan.resultsMissing++
|
||||||
libraryItem.setMissing()
|
libraryItem.setMissing()
|
||||||
itemsToUpdate.push(libraryItem)
|
itemsToUpdate.push(libraryItem)
|
||||||
|
Loading…
Reference in New Issue
Block a user