aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DisplayPreferencesController.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-08-12 20:37:31 +0200
committerBond_009 <bond.009@outlook.com>2022-08-18 13:56:23 +0200
commit5036afd69127cc6f6b0801329b2b04f21aee71f5 (patch)
tree24ca3d5f4dc15298e686c6c4944d9d04f9f40cc7 /Jellyfin.Api/Controllers/DisplayPreferencesController.cs
parent63d943aab92a4b5f69e625a269eb830bcbfb4d22 (diff)
Minor cleanup
Diffstat (limited to 'Jellyfin.Api/Controllers/DisplayPreferencesController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DisplayPreferencesController.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs
index 27eb22339..64ee5680c 100644
--- a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs
+++ b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs
@@ -89,12 +89,9 @@ namespace Jellyfin.Api.Controllers
// Load all custom display preferences
var customDisplayPreferences = _displayPreferencesManager.ListCustomItemDisplayPreferences(displayPreferences.UserId, itemId, displayPreferences.Client);
- if (customDisplayPreferences != null)
+ foreach (var (key, value) in customDisplayPreferences)
{
- foreach (var (key, value) in customDisplayPreferences)
- {
- dto.CustomPrefs.TryAdd(key, value);
- }
+ dto.CustomPrefs.TryAdd(key, value);
}
// This will essentially be a noop if no changes have been made, but new prefs must be saved at least.