Force Update LibraryItem model updatedAt refresh (fixes #2593)

This commit is contained in:
mikiher 2024-02-07 20:57:50 +02:00
parent 2ebdb44826
commit 19af7454f2

View File

@ -372,6 +372,9 @@ class LibraryItem extends Model {
if (!areEquivalent(updatedLibraryItem[key], existingValue, true)) { if (!areEquivalent(updatedLibraryItem[key], existingValue, true)) {
Logger.debug(`[LibraryItem] "${libraryItemExpanded.media.title}" ${key} updated from ${existingValue} to ${updatedLibraryItem[key]}`) Logger.debug(`[LibraryItem] "${libraryItemExpanded.media.title}" ${key} updated from ${existingValue} to ${updatedLibraryItem[key]}`)
hasLibraryItemUpdates = true hasLibraryItemUpdates = true
if (key === 'updatedAt') {
libraryItemExpanded.changed('updatedAt', true)
}
} }
} }
if (hasLibraryItemUpdates) { if (hasLibraryItemUpdates) {
@ -399,6 +402,7 @@ class LibraryItem extends Model {
isInvalid: !!oldLibraryItem.isInvalid, isInvalid: !!oldLibraryItem.isInvalid,
mtime: oldLibraryItem.mtimeMs, mtime: oldLibraryItem.mtimeMs,
ctime: oldLibraryItem.ctimeMs, ctime: oldLibraryItem.ctimeMs,
updatedAt: oldLibraryItem.updatedAt,
birthtime: oldLibraryItem.birthtimeMs, birthtime: oldLibraryItem.birthtimeMs,
size: oldLibraryItem.size, size: oldLibraryItem.size,
lastScan: oldLibraryItem.lastScan, lastScan: oldLibraryItem.lastScan,