You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/scanner/LibraryScanner.js
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -155,10 +155,10 @@ class LibraryScanner {
155
155
if(!libraryItemData){
156
156
// Fallback to finding matching library item with matching inode value
157
157
libraryItemData=libraryItemDataFound.find(lid=>
158
-
ItemToItemInoMatch(lid,existingLibraryItem)||
159
-
ItemToFileInoMatch(lid,existingLibraryItem)||
158
+
ItemToItemInoMatch(lid,existingLibraryItem)||
159
+
ItemToFileInoMatch(lid,existingLibraryItem)||
160
160
ItemToFileInoMatch(existingLibraryItem,lid)
161
-
)
161
+
)
162
162
if(libraryItemData){
163
163
libraryScan.addLog(LogLevel.INFO,`Library item with path "${existingLibraryItem.path}" was not found, but library item inode "${existingLibraryItem.ino}" was found at path "${libraryItemData.path}"`)
sequelize.where(sequelize.literal('(SELECT count(*) FROM json_each(libraryFiles) WHERE json_valid(json_each.value) AND json_each.value->>"$.ino" = :inode)'),{
643
+
[sequelize.Op.gt]: 0
644
+
})
645
+
],{
646
+
inode: ino
643
647
})
644
648
if(existingLibraryItem)
645
649
Logger.debug(`[LibraryScanner] Found library item with a library file matching inode "${ino}" at path "${existingLibraryItem.path}"`)
@@ -658,7 +662,7 @@ async function findLibraryItemByFileToItemInoMatch(libraryId, fullPath, isSingle
0 commit comments