Updated the summary and the Dto name.

This commit is contained in:
ArabCoders 2023-11-15 13:55:14 +03:00
parent 07db2025a1
commit c4013d2e10
4 changed files with 5 additions and 9 deletions

View File

@ -6,7 +6,6 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using System.Threading;
using Jellyfin.Data.Entities;
using MediaBrowser.Controller.Configuration;
@ -82,7 +81,7 @@ namespace Emby.Server.Implementations.Library
});
}
public void SaveUserData(User user, BaseItem item, UserDataDto userDataDto, UserDataSaveReason reason)
public void SaveUserData(User user, BaseItem item, UpdateUserItemDataDto userDataDto, UserDataSaveReason reason)
{
ArgumentNullException.ThrowIfNull(user);
ArgumentNullException.ThrowIfNull(item);

View File

@ -1,7 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading;
using Jellyfin.Api.Extensions;
using Jellyfin.Api.Helpers;
using Jellyfin.Api.ModelBinders;
@ -928,7 +927,7 @@ public class ItemsController : BaseJellyfinApiController
public ActionResult<UserItemDataDto> UpdateItemUserData(
[FromRoute, Required] Guid userId,
[FromRoute, Required] Guid itemId,
[FromBody, Required] UserDataDto userDataDto)
[FromBody, Required] UpdateUserItemDataDto userDataDto)
{
if (!RequestHelpers.AssertCanUpdateUser(_userManager, User, userId, true))
{

View File

@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="item">The item.</param>
/// <param name="userDataDto">The reason for updating the user data.</param>
/// <param name="reason">The reason.</param>
void SaveUserData(User user, BaseItem item, UserDataDto userDataDto, UserDataSaveReason reason);
void SaveUserData(User user, BaseItem item, UpdateUserItemDataDto userDataDto, UserDataSaveReason reason);
UserItemData GetUserData(User user, BaseItem item);

View File

@ -1,11 +1,9 @@
namespace MediaBrowser.Model.Dto
{
/// <summary>
/// Class UserDataDto extends UserItemDataDto to allow nullable members.
/// This change allow us to implement the new /Users/{UserId}/Items/{ItemId}/UserData endpoint.
/// This object allows the requestor to update all or specific user data fields without altering the non-nullable members state.
/// This is used by the api to get information about a item user data.
/// </summary>
public class UserDataDto : UserItemDataDto
public class UpdateUserItemDataDto : UserItemDataDto
{
/// <summary>
/// Gets or sets the playback position ticks.