aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
author7illusions <z@7illusions.com>2014-08-30 19:06:58 +0200
committer7illusions <z@7illusions.com>2014-08-30 19:06:58 +0200
commit66ad1699e22029b605e17735e8d9450285d8748a (patch)
treeffc92c88d24850b2f82b6b3a8bdd904a2ccc77a5 /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parent34bc54263e886aae777a3537dc50a6535b51330a (diff)
parent9d36f518182bc075c19d78084870f5115fa62d1e (diff)
Merge pull request #1 from MediaBrowser/master
Update to latest
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 64e0a6662..297d5e032 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -906,7 +906,7 @@ namespace MediaBrowser.Server.Implementations.Library
// Ensure the location is available.
Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
- return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, new MetadataRefreshOptions(), progress);
+ return new PeopleValidator(this, _logger, ConfigurationManager).ValidatePeople(cancellationToken, progress);
}
/// <summary>
@@ -1157,7 +1157,7 @@ namespace MediaBrowser.Server.Implementations.Library
private string GetCollectionType(string path)
{
return new DirectoryInfo(path).EnumerateFiles("*.collection", SearchOption.TopDirectoryOnly)
- .Select(i => Path.GetFileNameWithoutExtension(i.FullName))
+ .Select(i => _fileSystem.GetFileNameWithoutExtension(i))
.FirstOrDefault();
}
@@ -1486,23 +1486,22 @@ namespace MediaBrowser.Server.Implementations.Library
public async Task<UserView> GetNamedView(string name, string type, string sortName, CancellationToken cancellationToken)
{
- var id = "namedview_3_" + name;
- var guid = id.GetMD5();
+ var path = Path.Combine(ConfigurationManager.ApplicationPaths.ItemsByNamePath,
+ "views",
+ _fileSystem.GetValidFilename(type));
- var item = GetItemById(guid) as UserView;
+ var id = (path + "_namedview_" + name).GetMBId(typeof(UserView));
+
+ var item = GetItemById(id) as UserView;
if (item == null)
{
- var path = Path.Combine(ConfigurationManager.ApplicationPaths.ItemsByNamePath,
- "views",
- _fileSystem.GetValidFilename(type));
-
Directory.CreateDirectory(Path.GetDirectoryName(path));
item = new UserView
{
Path = path,
- Id = guid,
+ Id = id,
DateCreated = DateTime.UtcNow,
Name = name,
ViewType = type,