diff options
| author | Vasily <just.one.man@yandex.ru> | 2020-05-19 14:50:14 +0300 |
|---|---|---|
| committer | Vasily <just.one.man@yandex.ru> | 2020-05-19 14:50:14 +0300 |
| commit | a226a4ee03d974615a6fa26b936a93458a255b70 (patch) | |
| tree | 112f24683c4966c12c054288363d7731d90bfd05 /Emby.Server.Implementations/Data | |
| parent | f18293bf762c86581153ab8d9b1b6267421178a9 (diff) | |
Compute hash only when one is not computed in DB, small optimizations here and there
Diffstat (limited to 'Emby.Server.Implementations/Data')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 5a43a138b..10eb96b10 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -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 + |
