aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/ItemUpdateService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/ItemUpdateService.cs')
-rw-r--r--MediaBrowser.Api/ItemUpdateService.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs
index cdc33dfd4..8c04e979e 100644
--- a/MediaBrowser.Api/ItemUpdateService.cs
+++ b/MediaBrowser.Api/ItemUpdateService.cs
@@ -206,15 +206,16 @@ namespace MediaBrowser.Api
var newLockData = request.LockData ?? false;
var isLockedChanged = item.IsLocked != newLockData;
- UpdateItem(request, item);
-
- await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
-
+ // Do this first so that metadata savers can pull the updates from the database.
if (request.People != null)
{
await _libraryManager.UpdatePeople(item, request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList());
}
+ UpdateItem(request, item);
+
+ await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+
if (isLockedChanged && item.IsFolder)
{
var folder = (Folder)item;
@@ -243,7 +244,6 @@ namespace MediaBrowser.Api
item.DisplayMediaType = request.DisplayMediaType;
item.CommunityRating = request.CommunityRating;
- item.VoteCount = request.VoteCount;
item.HomePageUrl = request.HomePageUrl;
item.IndexNumber = request.IndexNumber;
item.ParentIndexNumber = request.ParentIndexNumber;