Skip to content

Commit

Permalink
Update scanner logs to show inode value on path changes and missing i…
Browse files Browse the repository at this point in the history
…tems #1447
  • Loading branch information
advplyr committed Mar 5, 2023
1 parent 557d324 commit db1ca08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/objects/LibraryItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class LibraryItem {
}

if (dataFound.ino !== this.ino) {
Logger.warn(`[LibraryItem] Check scan item changed inode "${this.ino}" -> "${dataFound.ino}"`)
this.ino = dataFound.ino
hasUpdated = true
}
Expand All @@ -347,7 +348,7 @@ class LibraryItem {
}

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.relPath = dataFound.relPath
hasUpdated = true
Expand Down
1 change: 1 addition & 0 deletions server/scanner/Scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ class Scanner {
const dataFound = libraryItemDataFound.find(lid => lid.ino === libraryItem.ino || comparePaths(lid.relPath, libraryItem.relPath))
if (!dataFound) {
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++
libraryItem.setMissing()
itemsToUpdate.push(libraryItem)
Expand Down

0 comments on commit db1ca08

Please sign in to comment.