Skip to content

Commit

Permalink
Force Update LibraryItem model updatedAt refresh (fixes advplyr#2593)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed Feb 7, 2024
1 parent 2ebdb44 commit 19af745
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/models/LibraryItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 19af745

Please sign in to comment.