diff options
| author | Techywarrior <techywarrior@gmail.com> | 2013-04-13 11:11:19 -0700 |
|---|---|---|
| committer | Techywarrior <techywarrior@gmail.com> | 2013-04-13 11:11:19 -0700 |
| commit | 6b47336da308c77e441b82c6a985db88c6d3ade3 (patch) | |
| tree | 455a36e52c4ca35e3b38060f96904fa4be5ee854 /MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs | |
| parent | dc8d9810b7a99bdcbc4959a77750b3cfee1e88b5 (diff) | |
| parent | 157a53a9f6d88c7f9db2346e42e010fe98734204 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs b/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs index 82e76e78d..a7cbd2149 100644 --- a/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs @@ -1,5 +1,6 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; @@ -34,7 +35,7 @@ namespace MediaBrowser.Server.Implementations.Sorting /// <returns>DateTime.</returns> private int GetValue(BaseItem x) { - var userdata = UserManager.GetUserData(User.Id, x.UserDataId).Result; + var userdata = UserDataRepository.GetUserData(User.Id, x.GetUserDataKey()).Result; return userdata == null ? 0 : userdata.PlayCount; } @@ -49,6 +50,12 @@ namespace MediaBrowser.Server.Implementations.Sorting } /// <summary> + /// Gets or sets the user data repository. + /// </summary> + /// <value>The user data repository.</value> + public IUserDataRepository UserDataRepository { get; set; } + + /// <summary> /// Gets or sets the user manager. /// </summary> /// <value>The user manager.</value> |
