diff options
| author | Shadowghost <Shadowghost@users.noreply.github.com> | 2026-10-05 19:19:05 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-10-05 19:19:05 -0400 |
| commit | a2bd48c1d235b929b20047d124382f83d9830668 (patch) | |
| tree | 8a78758b8c7fd28ec92604556282818693eeddda /MediaBrowser.Controller | |
| parent | 9c28aab413756ae7b61e6b9ad8e6d89d14e55a38 (diff) | |
Backport pull request #18278 from jellyfin/release-12.z
Compare local image dates with a one second tolerance
Original-merge: 2a59779ae98d96be782078ddf414040d931831ea
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 70e7da8932..022f8f0fbf 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -2560,8 +2560,9 @@ namespace MediaBrowser.Controller.Entities { var newDateModified = FileSystem.GetLastWriteTimeUtc(newImage); - // If date changed then we need to reset saved image dimensions - if (existing.DateModified != newDateModified && (existing.Width > 0 || existing.Height > 0)) + // If date changed then we need to reset saved image dimensions. Stores such as PostgreSQL keep + // only microseconds, so an exact comparison would treat every unchanged image as modified. + if (Math.Abs((existing.DateModified - newDateModified).TotalSeconds) > 1 && (existing.Width > 0 || existing.Height > 0)) { existing.Width = 0; existing.Height = 0; |
