added user data save reason

This commit is contained in:
Luke Pulverenti
2013-10-02 13:23:10 -04:00
parent bb4c918bf8
commit 1f7bc3e61d
9 changed files with 66 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using ServiceStack.ServiceHost;
using ServiceStack.Text.Controller;
using System;
@@ -228,7 +228,7 @@ namespace MediaBrowser.Api.UserLibrary
// Set favorite status
data.IsFavorite = isFavorite;
await UserDataRepository.SaveUserData(userId, key, data, CancellationToken.None).ConfigureAwait(false);
await UserDataRepository.SaveUserData(userId, key, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None).ConfigureAwait(false);
data = UserDataRepository.GetUserData(userId, key);
@@ -254,7 +254,7 @@ namespace MediaBrowser.Api.UserLibrary
data.Likes = likes;
await UserDataRepository.SaveUserData(userId, key, data, CancellationToken.None).ConfigureAwait(false);
await UserDataRepository.SaveUserData(userId, key, data, UserDataSaveReason.UpdateUserRating, CancellationToken.None).ConfigureAwait(false);
data = UserDataRepository.GetUserData(userId, key);