aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-25 13:27:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-25 13:27:36 -0400
commit7a5a1511cc7c10531b3e451420047f965bdaa2e6 (patch)
tree5a148cdf146aeab2b52cd9da7a9b4fe34dedb024 /MediaBrowser.Controller/Entities
parentb096f895ee23edaf692ffb516e1ca2f01fac5e1b (diff)
made file stamp a guid again
Diffstat (limited to 'MediaBrowser.Controller/Entities')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 83690c243f..c59094cbfb 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Common.Extensions;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization;
@@ -193,18 +194,23 @@ namespace MediaBrowser.Controller.Entities
/// <summary>
/// The _file system stamp
/// </summary>
- private string _fileSystemStamp;
+ private Guid? _fileSystemStamp;
/// <summary>
/// Gets a directory stamp, in the form of a string, that can be used for
/// comparison purposes to determine if the file system entries for this item have changed.
/// </summary>
/// <value>The file system stamp.</value>
[IgnoreDataMember]
- public string FileSystemStamp
+ public Guid FileSystemStamp
{
get
{
- return _fileSystemStamp ?? (_fileSystemStamp = GetFileSystemStamp());
+ if (!_fileSystemStamp.HasValue)
+ {
+ _fileSystemStamp = GetFileSystemStamp();
+ }
+
+ return _fileSystemStamp.Value;
}
}
@@ -226,12 +232,12 @@ namespace MediaBrowser.Controller.Entities
/// comparison purposes to determine if the file system entries for this item have changed.
/// </summary>
/// <returns>Guid.</returns>
- private string GetFileSystemStamp()
+ private Guid GetFileSystemStamp()
{
// If there's no path or the item is a file, there's nothing to do
if (LocationType != LocationType.FileSystem || !ResolveArgs.IsDirectory)
{
- return string.Empty;
+ return Guid.Empty;
}
var sb = new StringBuilder();
@@ -247,7 +253,7 @@ namespace MediaBrowser.Controller.Entities
sb.Append(file.cFileName);
}
- return sb.ToString();
+ return sb.ToString().GetMD5();
}
/// <summary>