aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ItemUpdateController.cs
diff options
context:
space:
mode:
authorMatt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com>2020-08-26 10:29:37 -0500
committerMatt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com>2020-08-26 10:29:37 -0500
commit2974a0248a5941f8b784a7bc99c17b1080b7d06f (patch)
tree1eec54868d88648684ca96e1ed6405e4372d5a95 /Jellyfin.Api/Controllers/ItemUpdateController.cs
parent1ff4f8e6c64b453eb9096b8da09f4041dbd463fc (diff)
parent4e3f26b647a9fe996b5a96ea10fa1f2468ea41fb (diff)
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemUpdateController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ItemUpdateController.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/ItemUpdateController.cs b/Jellyfin.Api/Controllers/ItemUpdateController.cs
index 4b40c6ada..ec52f4996 100644
--- a/Jellyfin.Api/Controllers/ItemUpdateController.cs
+++ b/Jellyfin.Api/Controllers/ItemUpdateController.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading;
+using System.Threading.Tasks;
using Jellyfin.Api.Constants;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
@@ -67,7 +68,7 @@ namespace Jellyfin.Api.Controllers
[HttpPost("Items/{itemId}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult UpdateItem([FromRoute] Guid itemId, [FromBody, Required] BaseItemDto request)
+ public async Task<ActionResult> UpdateItem([FromRoute] Guid itemId, [FromBody, Required] BaseItemDto request)
{
var item = _libraryManager.GetItemById(itemId);
if (item == null)
@@ -101,7 +102,7 @@ namespace Jellyfin.Api.Controllers
item.OnMetadataChanged();
- item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None);
+ await item.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
if (isLockedChanged && item.IsFolder)
{
@@ -110,7 +111,7 @@ namespace Jellyfin.Api.Controllers
foreach (var child in folder.GetRecursiveChildren())
{
child.IsLocked = newLockData;
- child.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None);
+ await child.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
}
}