mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Updated the summary and the Dto name.
This commit is contained in:
parent
07db2025a1
commit
c4013d2e10
4 changed files with 5 additions and 9 deletions
|
@ -6,7 +6,6 @@ using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Jellyfin.Data.Entities;
|
using Jellyfin.Data.Entities;
|
||||||
using MediaBrowser.Controller.Configuration;
|
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(user);
|
||||||
ArgumentNullException.ThrowIfNull(item);
|
ArgumentNullException.ThrowIfNull(item);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using Jellyfin.Api.Extensions;
|
using Jellyfin.Api.Extensions;
|
||||||
using Jellyfin.Api.Helpers;
|
using Jellyfin.Api.Helpers;
|
||||||
using Jellyfin.Api.ModelBinders;
|
using Jellyfin.Api.ModelBinders;
|
||||||
|
@ -928,7 +927,7 @@ public class ItemsController : BaseJellyfinApiController
|
||||||
public ActionResult<UserItemDataDto> UpdateItemUserData(
|
public ActionResult<UserItemDataDto> UpdateItemUserData(
|
||||||
[FromRoute, Required] Guid userId,
|
[FromRoute, Required] Guid userId,
|
||||||
[FromRoute, Required] Guid itemId,
|
[FromRoute, Required] Guid itemId,
|
||||||
[FromBody, Required] UserDataDto userDataDto)
|
[FromBody, Required] UpdateUserItemDataDto userDataDto)
|
||||||
{
|
{
|
||||||
if (!RequestHelpers.AssertCanUpdateUser(_userManager, User, userId, true))
|
if (!RequestHelpers.AssertCanUpdateUser(_userManager, User, userId, true))
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="userDataDto">The reason for updating the user data.</param>
|
/// <param name="userDataDto">The reason for updating the user data.</param>
|
||||||
/// <param name="reason">The reason.</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);
|
UserItemData GetUserData(User user, BaseItem item);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class UserDataDto extends UserItemDataDto to allow nullable members.
|
/// This is used by the api to get information about a item user data.
|
||||||
/// 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.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UserDataDto : UserItemDataDto
|
public class UpdateUserItemDataDto : UserItemDataDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the playback position ticks.
|
/// Gets or sets the playback position ticks.
|
Loading…
Add table
Add a link
Reference in a new issue