implement suggestions
This commit is contained in:
parent
261a2e1989
commit
18906d0205
|
@ -31,8 +31,12 @@ namespace Emby.Naming.Video
|
|||
|
||||
public IEnumerable<FileStack> ResolveAudioBooks(IEnumerable<FileSystemMetadata> 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)
|
||||
|
|
|
@ -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<VideoFileInfo> { i }, Year = i.Year
|
||||
Files = new List<VideoFileInfo> { i },
|
||||
Year = i.Year
|
||||
}));
|
||||
|
||||
return list;
|
||||
|
|
Loading…
Reference in New Issue
Block a user