Merge pull request #4412 from cvium/fix_displaypreferences_creation

Save new display preferences
This commit is contained in:
Claus Vium 2020-11-08 10:22:05 +01:00 committed by GitHub
commit 1823cbb026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,9 @@ namespace Jellyfin.Api.Controllers
dto.CustomPrefs["enableNextVideoInfoOverlay"] = displayPreferences.EnableNextVideoInfoOverlay.ToString(CultureInfo.InvariantCulture); dto.CustomPrefs["enableNextVideoInfoOverlay"] = displayPreferences.EnableNextVideoInfoOverlay.ToString(CultureInfo.InvariantCulture);
dto.CustomPrefs["tvhome"] = displayPreferences.TvHome; dto.CustomPrefs["tvhome"] = displayPreferences.TvHome;
// This will essentially be a noop if no changes have been made, but new prefs must be saved at least.
_displayPreferencesManager.SaveChanges();
return dto; return dto;
} }

View File

@ -12,6 +12,9 @@ namespace MediaBrowser.Controller
/// <summary> /// <summary>
/// Gets the display preferences for the user and client. /// Gets the display preferences for the user and client.
/// </summary> /// </summary>
/// <remarks>
/// This will create the display preferences if it does not exist, but it will not save automatically.
/// </remarks>
/// <param name="userId">The user's id.</param> /// <param name="userId">The user's id.</param>
/// <param name="client">The client string.</param> /// <param name="client">The client string.</param>
/// <returns>The associated display preferences.</returns> /// <returns>The associated display preferences.</returns>
@ -20,6 +23,9 @@ namespace MediaBrowser.Controller
/// <summary> /// <summary>
/// Gets the default item display preferences for the user and client. /// Gets the default item display preferences for the user and client.
/// </summary> /// </summary>
/// <remarks>
/// This will create the item display preferences if it does not exist, but it will not save automatically.
/// </remarks>
/// <param name="userId">The user id.</param> /// <param name="userId">The user id.</param>
/// <param name="itemId">The item id.</param> /// <param name="itemId">The item id.</param>
/// <param name="client">The client string.</param> /// <param name="client">The client string.</param>