Browse Source

Suggestion from review

crobibero 4 years ago
parent
commit
685c966468
1 changed files with 1 additions and 4 deletions
  1. 1 4
      Jellyfin.Api/Controllers/DisplayPreferencesController.cs

+ 1 - 4
Jellyfin.Api/Controllers/DisplayPreferencesController.cs

@@ -87,10 +87,7 @@ namespace Jellyfin.Api.Controllers
             {
             {
                 foreach (var (key, value) in customDisplayPreferences)
                 foreach (var (key, value) in customDisplayPreferences)
                 {
                 {
-                    if (!dto.CustomPrefs.ContainsKey(key))
-                    {
-                        dto.CustomPrefs[key] = value;
-                    }
+                    dto.CustomPrefs.TryAdd(key, value);
                 }
                 }
             }
             }