diff options
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; } } |
