diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-02-08 15:00:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-08 15:00:36 -0500 |
| commit | 52d496386fd6a042aa0812deea052fc563688585 (patch) | |
| tree | c053a78597990e294560b7b745e8939e10f1c10f /Emby.Server.Implementations/Library | |
| parent | b073cdc91ff8fa783d8cd62bfdf9f03062c1a703 (diff) | |
| parent | 2fa03c19d48fca865f108895f28b7fb436b9edf4 (diff) | |
Merge pull request #2451 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Library')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 12 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs | 21 |
2 files changed, 22 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index de3a1664e..616c6c1a2 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2627,6 +2627,18 @@ namespace Emby.Server.Implementations.Library } } + foreach (var map in ConfigurationManager.Configuration.PathSubstitutions) + { + if (!string.IsNullOrWhiteSpace(map.From)) + { + var substitutionResult = SubstitutePathInternal(path, map.From, map.To); + if (substitutionResult.Item2) + { + return substitutionResult.Item1; + } + } + } + return path; } diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs index 6cf201990..2971405b9 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs @@ -74,21 +74,20 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio return new MusicArtist(); } - return null; - //if (_config.Configuration.EnableSimpleArtistDetection) - //{ - // return null; - //} + if (_config.Configuration.EnableSimpleArtistDetection) + { + return null; + } - //// Avoid mis-identifying top folders - //if (args.Parent.IsRoot) return null; + // Avoid mis-identifying top folders + if (args.Parent.IsRoot) return null; - //var directoryService = args.DirectoryService; + var directoryService = args.DirectoryService; - //var albumResolver = new MusicAlbumResolver(_logger, _fileSystem, _libraryManager); + var albumResolver = new MusicAlbumResolver(_logger, _fileSystem, _libraryManager); - //// If we contain an album assume we are an artist folder - //return args.FileSystemChildren.Where(i => i.IsDirectory).Any(i => albumResolver.IsMusicAlbum(i.FullName, directoryService, args.GetLibraryOptions())) ? new MusicArtist() : null; + // If we contain an album assume we are an artist folder + return args.FileSystemChildren.Where(i => i.IsDirectory).Any(i => albumResolver.IsMusicAlbum(i.FullName, directoryService, args.GetLibraryOptions())) ? new MusicArtist() : null; } } |
