mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
Rename Hash to BlurHash in all properties and methods for clarity
This commit is contained in:
@@ -1144,7 +1144,7 @@ namespace Emby.Server.Implementations.Data
|
||||
const string delimeter = "*";
|
||||
|
||||
var path = image.Path ?? string.Empty;
|
||||
var hash = image.Hash ?? string.Empty;
|
||||
var hash = image.BlurHash ?? string.Empty;
|
||||
|
||||
return GetPathToSave(path) +
|
||||
delimeter +
|
||||
@@ -1195,7 +1195,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
if (parts.Length >= 6)
|
||||
{
|
||||
image.Hash = parts[5].Replace('/', '*').Replace('\\', '|');
|
||||
image.BlurHash = parts[5].Replace('/', '*').Replace('\\', '|');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -718,7 +718,7 @@ namespace Emby.Server.Implementations.Dto
|
||||
if (options.EnableImages)
|
||||
{
|
||||
dto.ImageTags = new Dictionary<ImageType, string>();
|
||||
dto.ImageHashes = new Dictionary<string, string>();
|
||||
dto.ImageBlurHashes = new Dictionary<string, string>();
|
||||
|
||||
// Prevent implicitly captured closure
|
||||
var currentItem = item;
|
||||
@@ -733,10 +733,10 @@ namespace Emby.Server.Implementations.Dto
|
||||
dto.ImageTags[image.Type] = tag;
|
||||
}
|
||||
|
||||
var hash = image.Hash;
|
||||
var hash = image.BlurHash;
|
||||
if (!string.IsNullOrEmpty(hash))
|
||||
{
|
||||
dto.ImageHashes[tag] = image.Hash;
|
||||
dto.ImageBlurHashes[tag] = image.BlurHash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1829,7 +1829,7 @@ namespace Emby.Server.Implementations.Library
|
||||
}
|
||||
|
||||
var outdated = item.ImageInfos
|
||||
.Where(i => (i.IsLocalFile && (i.Width == 0 || i.Height == 0 || string.IsNullOrEmpty(i.Hash))))
|
||||
.Where(i => (i.IsLocalFile && (i.Width == 0 || i.Height == 0 || string.IsNullOrEmpty(i.BlurHash))))
|
||||
.ToList();
|
||||
if (outdated.Count == 0)
|
||||
{
|
||||
@@ -1842,7 +1842,7 @@ namespace Emby.Server.Implementations.Library
|
||||
ImageDimensions size = _imageProcessor.GetImageDimensions(item, img);
|
||||
img.Width = size.Width;
|
||||
img.Height = size.Height;
|
||||
img.Hash = _imageProcessor.GetImageHash(img.Path);
|
||||
img.BlurHash = _imageProcessor.GetImageBlurHash(img.Path);
|
||||
});
|
||||
|
||||
_itemRepository.SaveImages(item);
|
||||
|
||||
Reference in New Issue
Block a user