mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Refactor Display preference manager (#14056)
This commit is contained in:
parent
4849486fa0
commit
20f7ddbf8f
4 changed files with 102 additions and 91 deletions
|
|
@ -96,9 +96,6 @@ public class DisplayPreferencesController : BaseJellyfinApiController
|
|||
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.
|
||||
_displayPreferencesManager.SaveChanges();
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
|
@ -210,8 +207,8 @@ public class DisplayPreferencesController : BaseJellyfinApiController
|
|||
|
||||
// Set all remaining custom preferences.
|
||||
_displayPreferencesManager.SetCustomItemDisplayPreferences(userId.Value, itemId, existingDisplayPreferences.Client, displayPreferences.CustomPrefs);
|
||||
_displayPreferencesManager.SaveChanges();
|
||||
|
||||
_displayPreferencesManager.UpdateItemDisplayPreferences(itemPrefs);
|
||||
_displayPreferencesManager.UpdateDisplayPreferences(existingDisplayPreferences);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue