mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-20 17:16:42 +00:00
More small optimizations
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1831,10 +1831,11 @@ namespace Emby.Server.Implementations.Library
|
||||
}
|
||||
|
||||
var outdated = item.ImageInfos
|
||||
.Where(i => (i.Width == 0 || i.Height == 0 || string.IsNullOrEmpty(i.Hash)))
|
||||
.Where(i => (i.IsLocalFile && (i.Width == 0 || i.Height == 0 || string.IsNullOrEmpty(i.Hash))))
|
||||
.ToList();
|
||||
if (outdated.Count == 0)
|
||||
{
|
||||
RegisterItem(item);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user