aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-03-29 20:31:59 +0200
committerShadowghost <Ghost_of_Stone@web.de>2022-09-13 17:20:22 +0200
commitcfd1db16387b75c340f6e2e7f453a8a97be02eaf (patch)
treeb5fb5ce475555ff59e3e7fe9660d5cf9cc4d0791
parente6c6482b9e698d3bcf73a0d06b82d483117b0ad5 (diff)
Prevent MusicArtist creation for artist subfolders
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
index 210ed0953..b7c1724c0 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs
@@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
var isMusicMediaFolder = string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase);
- // If there's a collection type and it's not music, it can't be a series
+ // If there's a collection type and it's not music, it can't be a music artist
if (!isMusicMediaFolder)
{
return null;
@@ -87,6 +87,15 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
var result = Parallel.ForEach(directories, (fileSystemInfo, state) =>
{
+ foreach (var subfolder in _namingOptions.ArtistSubfolders)
+ {
+ if (fileSystemInfo.Name.Equals(subfolder, StringComparison.OrdinalIgnoreCase))
+ {
+ // stop once we see a artist subfolder
+ state.Stop();
+ }
+ }
+
if (albumResolver.IsMusicAlbum(fileSystemInfo.FullName, directoryService))
{
// stop once we see a music album