|
@@ -1,4 +1,5 @@
|
|
-using MediaBrowser.Controller.Configuration;
|
|
|
|
|
|
+using MediaBrowser.Common.Extensions;
|
|
|
|
+using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Controller.IO;
|
|
using MediaBrowser.Controller.IO;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Controller.Localization;
|
|
using MediaBrowser.Controller.Localization;
|
|
@@ -193,18 +194,23 @@ namespace MediaBrowser.Controller.Entities
|
|
/// <summary>
|
|
/// <summary>
|
|
/// The _file system stamp
|
|
/// The _file system stamp
|
|
/// </summary>
|
|
/// </summary>
|
|
- private string _fileSystemStamp;
|
|
|
|
|
|
+ private Guid? _fileSystemStamp;
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Gets a directory stamp, in the form of a string, that can be used for
|
|
/// 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.
|
|
/// comparison purposes to determine if the file system entries for this item have changed.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <value>The file system stamp.</value>
|
|
/// <value>The file system stamp.</value>
|
|
[IgnoreDataMember]
|
|
[IgnoreDataMember]
|
|
- public string FileSystemStamp
|
|
|
|
|
|
+ public Guid FileSystemStamp
|
|
{
|
|
{
|
|
get
|
|
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.
|
|
/// comparison purposes to determine if the file system entries for this item have changed.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns>Guid.</returns>
|
|
/// <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 there's no path or the item is a file, there's nothing to do
|
|
if (LocationType != LocationType.FileSystem || !ResolveArgs.IsDirectory)
|
|
if (LocationType != LocationType.FileSystem || !ResolveArgs.IsDirectory)
|
|
{
|
|
{
|
|
- return string.Empty;
|
|
|
|
|
|
+ return Guid.Empty;
|
|
}
|
|
}
|
|
|
|
|
|
var sb = new StringBuilder();
|
|
var sb = new StringBuilder();
|
|
@@ -247,7 +253,7 @@ namespace MediaBrowser.Controller.Entities
|
|
sb.Append(file.cFileName);
|
|
sb.Append(file.cFileName);
|
|
}
|
|
}
|
|
|
|
|
|
- return sb.ToString();
|
|
|
|
|
|
+ return sb.ToString().GetMD5();
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|