support artists tag value

This commit is contained in:
Luke Pulverenti
2015-01-27 17:45:59 -05:00
parent b3127f19b5
commit 782fe92cf7
16 changed files with 94 additions and 57 deletions

View File

@@ -13,7 +13,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using MediaBrowser.Naming.Audio;
@@ -579,7 +578,7 @@ namespace MediaBrowser.Server.Implementations.Library
collectionType = GetContentTypeOverride(fullPath, true);
}
var args = new ItemResolveArgs(ConfigurationManager.ApplicationPaths, this, directoryService)
var args = new ItemResolveArgs(ConfigurationManager.ApplicationPaths, directoryService)
{
Parent = parent,
Path = fullPath,
@@ -753,12 +752,14 @@ namespace MediaBrowser.Server.Implementations.Library
Directory.CreateDirectory(userRootPath);
_userRootFolder = GetItemById(GetNewItemId(userRootPath, typeof(UserRootFolder))) as UserRootFolder;
var tmpItem = GetItemById(GetNewItemId(userRootPath, typeof(UserRootFolder))) as UserRootFolder;
if (_userRootFolder == null)
if (tmpItem == null)
{
_userRootFolder = (UserRootFolder)ResolvePath(new DirectoryInfo(userRootPath));
tmpItem = (UserRootFolder)ResolvePath(new DirectoryInfo(userRootPath));
}
_userRootFolder = tmpItem;
}
}
}

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
@@ -11,10 +12,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
class SpecialFolderResolver : FolderResolver<Folder>
{
private readonly IFileSystem _fileSystem;
private readonly IServerApplicationPaths _appPaths;
public SpecialFolderResolver(IFileSystem fileSystem)
public SpecialFolderResolver(IFileSystem fileSystem, IServerApplicationPaths appPaths)
{
_fileSystem = fileSystem;
_appPaths = appPaths;
}
/// <summary>
@@ -39,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
{
return new AggregateFolder();
}
if (args.IsRoot)
if (string.Equals(args.Path, _appPaths.DefaultUserViewsPath, StringComparison.OrdinalIgnoreCase))
{
return new UserRootFolder(); //if we got here and still a root - must be user root
}