More small optimizations

This commit is contained in:
Vasily
2020-05-19 14:56:52 +03:00
parent a226a4ee03
commit 186b7f303c
3 changed files with 5 additions and 9 deletions

View File

@@ -722,8 +722,7 @@ namespace Emby.Server.Implementations.Dto
// Prevent implicitly captured closure
var currentItem = item;
foreach (var image in currentItem.ImageInfos.Where(i => !currentItem.AllowsMultipleImages(i.Type))
.ToList())
foreach (var image in currentItem.ImageInfos.Where(i => !currentItem.AllowsMultipleImages(i.Type)))
{
if (options.GetImageLimit(image.Type) > 0)
{
@@ -735,7 +734,7 @@ namespace Emby.Server.Implementations.Dto
}
var hash = image.Hash;
if (hash != null && hash.Length > 0)
if (!string.IsNullOrEmpty(hash))
{
dto.ImageHashes[tag] = image.Hash;
}