Compute hash only when one is not computed in DB, small optimizations here and there

This commit is contained in:
Vasily
2020-05-19 14:50:14 +03:00
parent f18293bf76
commit a226a4ee03
5 changed files with 37 additions and 68 deletions

View File

@@ -1141,20 +1141,10 @@ namespace Emby.Server.Implementations.Data
public string ToValueString(ItemImageInfo image)
{
var delimeter = "*";
const string delimeter = "*";
var path = image.Path;
var hash = image.Hash;
if (path == null)
{
path = string.Empty;
}
if (hash == null)
{
hash = string.Empty;
}
var path = image.Path ?? string.Empty;
var hash = image.Hash ?? string.Empty;
return GetPathToSave(path) +
delimeter +