mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
Use Order() introduced in .NET 7 (#8923)
This commit is contained in:
parent
b80b50437c
commit
497d8c4957
@ -131,7 +131,7 @@ namespace Emby.Server.Implementations.IO
|
||||
.OfType<Folder>()
|
||||
.SelectMany(f => f.PhysicalLocations)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(i => i);
|
||||
.Order();
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
|
@ -1175,7 +1175,7 @@ namespace Emby.Server.Implementations.Library
|
||||
}
|
||||
})
|
||||
.Where(i => i is not null)
|
||||
.OrderBy(i => i)
|
||||
.Order()
|
||||
.ToArray(),
|
||||
|
||||
CollectionType = GetCollectionType(dir)
|
||||
|
@ -529,7 +529,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||
}
|
||||
|
||||
return false;
|
||||
}).OrderBy(i => i).ToList();
|
||||
}).Order().ToList();
|
||||
|
||||
// If different video types were found, don't allow this
|
||||
if (videoTypes.Distinct().Count() > 1)
|
||||
|
@ -92,25 +92,25 @@ namespace Jellyfin.Api.Controllers
|
||||
Years = itemList.Select(i => i.ProductionYear ?? -1)
|
||||
.Where(i => i > 0)
|
||||
.Distinct()
|
||||
.OrderBy(i => i)
|
||||
.Order()
|
||||
.ToArray(),
|
||||
|
||||
Genres = itemList.SelectMany(i => i.Genres)
|
||||
.DistinctNames()
|
||||
.OrderBy(i => i)
|
||||
.Order()
|
||||
.ToArray(),
|
||||
|
||||
Tags = itemList
|
||||
.SelectMany(i => i.Tags)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(i => i)
|
||||
.Order()
|
||||
.ToArray(),
|
||||
|
||||
OfficialRatings = itemList
|
||||
.Select(i => i.OfficialRating)
|
||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(i => i)
|
||||
.Order()
|
||||
.ToArray()
|
||||
};
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ namespace MediaBrowser.Providers.Manager
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
|
||||
if (currentList.Length != item.Genres.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Genres.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
||||
if (currentList.Length != item.Genres.Length || !currentList.Order().SequenceEqual(item.Genres.Order(), StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
updateType |= ItemUpdateType.MetadataEdit;
|
||||
}
|
||||
@ -486,7 +486,7 @@ namespace MediaBrowser.Providers.Manager
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
|
||||
if (currentList.Length != item.Studios.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Studios.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
||||
if (currentList.Length != item.Studios.Length || !currentList.Order().SequenceEqual(item.Studios.Order(), StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
updateType |= ItemUpdateType.MetadataEdit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user