Migrate default library display preferences.
This commit is contained in:
parent
c3a36485b6
commit
c094916df0
|
@ -110,6 +110,16 @@ namespace Jellyfin.Server.Migrations.Routines
|
|||
});
|
||||
}
|
||||
|
||||
var defaultLibraryPrefs = new ItemDisplayPreferences(displayPreferences.UserId, Guid.Empty, displayPreferences.Client)
|
||||
{
|
||||
SortBy = dto.SortBy ?? "SortName",
|
||||
SortOrder = dto.SortOrder,
|
||||
RememberIndexing = dto.RememberIndexing,
|
||||
RememberSorting = dto.RememberSorting,
|
||||
};
|
||||
|
||||
dbContext.Add(defaultLibraryPrefs);
|
||||
|
||||
foreach (var key in dto.CustomPrefs.Keys.Where(key => key.StartsWith("landing-", StringComparison.Ordinal)))
|
||||
{
|
||||
if (!Guid.TryParse(key.AsSpan().Slice("landing-".Length), out var itemId))
|
||||
|
|
Loading…
Reference in New Issue
Block a user