diff options
| author | Tim Eisele <Ghost_of_Stone@web.de> | 2025-06-27 01:50:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-26 17:50:37 -0600 |
| commit | c6e568692ee14e66e6c844dc1e5481d705a096da (patch) | |
| tree | 409a64acda4dc452f41ada02888bd630f5ecc09c /MediaBrowser.Controller | |
| parent | d5a76bdff8fa7c7771f4bb5d64c4e0ac254e8927 (diff) | |
Fix modification checks and make sure to use UTC (#14347)
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 96984758f..4efa3f410 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1423,23 +1423,16 @@ namespace MediaBrowser.Controller.Entities public virtual bool RequiresRefresh() { - if (string.IsNullOrEmpty(Path) || DateModified == default) + if (string.IsNullOrEmpty(Path) || DateModified == DateTime.MinValue) { return false; } var info = FileSystem.GetFileSystemInfo(Path); - if (info.Exists) - { - if (info.IsDirectory) - { - return info.LastWriteTimeUtc != DateModified; - } - return info.LastWriteTimeUtc != DateModified; - } - - return false; + return info.Exists + ? info.LastWriteTimeUtc != DateModified + : false; } public virtual List<string> GetUserDataKeys() |
