mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Clean up some ToList usage
This commit is contained in:
parent
5cd37686ac
commit
08e71010ae
@ -101,7 +101,8 @@ namespace Emby.Naming.AudioBook
|
||||
{
|
||||
var extra = ex
|
||||
.OrderBy(x => x.Container)
|
||||
.ThenBy(x => x.Path);
|
||||
.ThenBy(x => x.Path)
|
||||
.ToList();
|
||||
|
||||
stackFiles = stackFiles.Except(extra).ToList();
|
||||
extras.AddRange(extra);
|
||||
|
@ -232,7 +232,10 @@ namespace Emby.Server.Implementations.Collections
|
||||
|
||||
if (list.Count > 0)
|
||||
{
|
||||
collection.LinkedChildren = collection.LinkedChildren.Concat(list).ToArray();
|
||||
LinkedChild[] newChildren = new LinkedChild[collection.LinkedChildren.Length + list.Count];
|
||||
collection.LinkedChildren.CopyTo(newChildren, 0);
|
||||
list.CopyTo(newChildren, collection.LinkedChildren.Length);
|
||||
collection.LinkedChildren = newChildren;
|
||||
collection.UpdateRatingToItems(linkedChildrenList);
|
||||
|
||||
await collection.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
|
@ -615,7 +615,8 @@ namespace Emby.Server.Implementations.Library
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
var dupes = list.Where(subPath => !subPath.EndsWith(":\\", StringComparison.OrdinalIgnoreCase) && list.Any(i => _fileSystem.ContainsSubPath(i, subPath)));
|
||||
var dupes = list.Where(subPath => !subPath.EndsWith(":\\", StringComparison.OrdinalIgnoreCase) && list.Any(i => _fileSystem.ContainsSubPath(i, subPath)))
|
||||
.ToList();
|
||||
|
||||
foreach (var dupe in dupes)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user