From 19af7454f219106a717966522e2b7e1c968c4a28 Mon Sep 17 00:00:00 2001 From: mikiher Date: Wed, 7 Feb 2024 20:57:50 +0200 Subject: [PATCH] Force Update LibraryItem model updatedAt refresh (fixes #2593) --- server/models/LibraryItem.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/models/LibraryItem.js b/server/models/LibraryItem.js index ee8a4bb8..c8971e91 100644 --- a/server/models/LibraryItem.js +++ b/server/models/LibraryItem.js @@ -372,6 +372,9 @@ class LibraryItem extends Model { if (!areEquivalent(updatedLibraryItem[key], existingValue, true)) { Logger.debug(`[LibraryItem] "${libraryItemExpanded.media.title}" ${key} updated from ${existingValue} to ${updatedLibraryItem[key]}`) hasLibraryItemUpdates = true + if (key === 'updatedAt') { + libraryItemExpanded.changed('updatedAt', true) + } } } if (hasLibraryItemUpdates) { @@ -399,6 +402,7 @@ class LibraryItem extends Model { isInvalid: !!oldLibraryItem.isInvalid, mtime: oldLibraryItem.mtimeMs, ctime: oldLibraryItem.ctimeMs, + updatedAt: oldLibraryItem.updatedAt, birthtime: oldLibraryItem.birthtimeMs, size: oldLibraryItem.size, lastScan: oldLibraryItem.lastScan,