mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-26 03:57:12 +00:00
Add BlurHash support to backend
This commit is contained in:
@@ -1144,12 +1144,18 @@ namespace Emby.Server.Implementations.Data
|
||||
var delimeter = "*";
|
||||
|
||||
var path = image.Path;
|
||||
var hash = image.Hash;
|
||||
|
||||
if (path == null)
|
||||
{
|
||||
path = string.Empty;
|
||||
}
|
||||
|
||||
if (hash == null)
|
||||
{
|
||||
hash = string.Empty;
|
||||
}
|
||||
|
||||
return GetPathToSave(path) +
|
||||
delimeter +
|
||||
image.DateModified.Ticks.ToString(CultureInfo.InvariantCulture) +
|
||||
@@ -1158,7 +1164,11 @@ namespace Emby.Server.Implementations.Data
|
||||
delimeter +
|
||||
image.Width.ToString(CultureInfo.InvariantCulture) +
|
||||
delimeter +
|
||||
image.Height.ToString(CultureInfo.InvariantCulture);
|
||||
image.Height.ToString(CultureInfo.InvariantCulture) +
|
||||
delimeter +
|
||||
// Replace delimiters with other characters.
|
||||
// This can be removed when we migrate to a proper DB.
|
||||
hash.Replace('*', '/').Replace('|', '\\');
|
||||
}
|
||||
|
||||
public ItemImageInfo ItemImageInfoFromValueString(string value)
|
||||
@@ -1192,6 +1202,11 @@ namespace Emby.Server.Implementations.Data
|
||||
image.Width = width;
|
||||
image.Height = height;
|
||||
}
|
||||
|
||||
if (parts.Length >= 6)
|
||||
{
|
||||
image.Hash = parts[5].Replace('/', '*').Replace('\\', '|');
|
||||
}
|
||||
}
|
||||
|
||||
return image;
|
||||
|
||||
Reference in New Issue
Block a user