diff options
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index c2efa4ad3..bb0b26b8e 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1423,23 +1423,14 @@ 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 && this.HasChanged(info.LastWriteTimeUtc); } public virtual List<string> GetUserDataKeys() @@ -2002,9 +1993,10 @@ namespace MediaBrowser.Controller.Entities } // Remove from file system - if (info.IsLocalFile) + var path = info.Path; + if (info.IsLocalFile && !string.IsNullOrWhiteSpace(path)) { - FileSystem.DeleteFile(info.Path); + FileSystem.DeleteFile(path); } // Remove from item |
