Skip to content

Commit

Permalink
Fix multi-part album folder being detected as artist folder (jellyfin…
Browse files Browse the repository at this point in the history
  • Loading branch information
gnattu committed May 31, 2024
1 parent b8a0cf6 commit d602b6d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Emby.Naming.Audio;
using Emby.Naming.Common;
using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Entities.Audio;
Expand Down Expand Up @@ -85,6 +86,7 @@ protected override MusicArtist Resolve(ItemResolveArgs args)
}

var albumResolver = new MusicAlbumResolver(_logger, _namingOptions, _directoryService);
var albumParser = new AlbumParser(_namingOptions);

var directories = args.FileSystemChildren.Where(i => i.IsDirectory);

Expand All @@ -100,6 +102,12 @@ protected override MusicArtist Resolve(ItemResolveArgs args)
}
}
// If the folder is a multi-disc folder, then it is not an artist folder
if (albumParser.IsMultiPart(fileSystemInfo.FullName))
{
return;
}
// If we contain a music album assume we are an artist folder
if (albumResolver.IsMusicAlbum(fileSystemInfo.FullName, _directoryService))
{
Expand Down

0 comments on commit d602b6d

Please sign in to comment.