diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-09-09 13:27:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-09 13:27:52 +0200 |
| commit | 1cbf5431aa74274627082cb02349a3241cd8801b (patch) | |
| tree | 37879e5acc95a72082d162addb1789165bf4cd36 /Jellyfin.Api/Controllers/DisplayPreferencesController.cs | |
| parent | c12cab6844c5253240b725e3de634fb505a23d1b (diff) | |
| parent | 5036afd69127cc6f6b0801329b2b04f21aee71f5 (diff) | |
Merge pull request #8250 from Bond-009/minor18
Minor cleanup
Diffstat (limited to 'Jellyfin.Api/Controllers/DisplayPreferencesController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/DisplayPreferencesController.cs | 7 |
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. |
