Applied review comments

This commit is contained in:
JPVenson
2025-01-15 20:12:41 +00:00
parent d716a53ec2
commit b33810534b
7 changed files with 44 additions and 30 deletions

View File

@@ -146,8 +146,8 @@ namespace Emby.Server.Implementations.Library
{
ItemId = itemId,
CustomDataKey = dto.Key,
Item = null!,
User = null!,
Item = null,
User = null,
AudioStreamIndex = dto.AudioStreamIndex,
IsFavorite = dto.IsFavorite,
LastPlayedDate = dto.LastPlayedDate,
@@ -181,7 +181,13 @@ namespace Emby.Server.Implementations.Library
private UserItemData? GetUserData(User user, Guid itemId, List<string> keys)
{
var cacheKey = GetCacheKey(user.InternalId, itemId);
var data = GetUserDataInternal(user.Id, itemId, keys);
if (_userData.TryGetValue(cacheKey, out var data))
{
return data;
}
data = GetUserDataInternal(user.Id, itemId, keys);
if (data is null)
{