aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Dto/DtoService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2024-04-13 01:45:01 +0200
committerGitHub <noreply@github.com>2024-04-12 17:45:01 -0600
commit7d28d08e08a412ab88ede368220562799f2bd7c0 (patch)
treebf9b37aefa6561599347e4ec02a32b29bd301f55 /Emby.Server.Implementations/Dto/DtoService.cs
parent134bf7a6a58402a08e8e59f7f9ee626881dfa183 (diff)
Enable more warnings as errors (#11288)
Diffstat (limited to 'Emby.Server.Implementations/Dto/DtoService.cs')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 5da9bea26..98eacb52b 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -668,12 +668,13 @@ namespace Emby.Server.Implementations.Dto
{
dto.ImageBlurHashes ??= new Dictionary<ImageType, Dictionary<string, string>>();
- if (!dto.ImageBlurHashes.ContainsKey(image.Type))
+ if (!dto.ImageBlurHashes.TryGetValue(image.Type, out var value))
{
- dto.ImageBlurHashes[image.Type] = new Dictionary<string, string>();
+ value = new Dictionary<string, string>();
+ dto.ImageBlurHashes[image.Type] = value;
}
- dto.ImageBlurHashes[image.Type][tag] = image.BlurHash;
+ value[tag] = image.BlurHash;
}
return tag;