diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs index a943839f2..f733cd262 100644 --- a/Emby.Naming/Video/StackResolver.cs +++ b/Emby.Naming/Video/StackResolver.cs @@ -31,8 +31,12 @@ namespace Emby.Naming.Video public IEnumerable ResolveAudioBooks(IEnumerable files) { - foreach (var directory in files.GroupBy(file => - file.IsDirectory ? file.FullName : Path.GetDirectoryName(file.FullName))) + var groupedDirectoryFiles = files.GroupBy(file => + file.IsDirectory + ? file.FullName + : Path.GetDirectoryName(file.FullName)); + + foreach (var directory in groupedDirectoryFiles) { var stack = new FileStack { Name = Path.GetFileName(directory.Key), IsDirectoryStack = false }; foreach (var file in directory) diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 29b42cdc1..125228b36 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -151,7 +151,8 @@ namespace Emby.Naming.Video // Whatever files are left, just add them list.AddRange(remainingFiles.Select(i => new VideoInfo(i.Name) { - Files = new List { i }, Year = i.Year + Files = new List { i }, + Year = i.Year })); return list;