diff options
| author | Techywarrior <techywarrior@gmail.com> | 2013-04-02 13:07:55 -0700 |
|---|---|---|
| committer | Techywarrior <techywarrior@gmail.com> | 2013-04-02 13:07:55 -0700 |
| commit | 713afcf6755b15142244cad6b16f8d539bd12893 (patch) | |
| tree | d5d7479281f85fc47d24d8c95a2ce29a3a146d8b /MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs | |
| parent | c957f202cc1fefb174377b99495b329a6cb9ee72 (diff) | |
| parent | e2562879d86aafc1063e37bfd353c22309e8e237 (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 9cd5281c3..82e76e78d 100644 --- a/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/MediaBrowser.Server.Implementations/Sorting/PlayCountComparer.cs @@ -1,4 +1,5 @@ using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; @@ -33,7 +34,7 @@ namespace MediaBrowser.Server.Implementations.Sorting /// <returns>DateTime.</returns> private int GetValue(BaseItem x) { - var userdata = x.GetUserData(User, false); + var userdata = UserManager.GetUserData(User.Id, x.UserDataId).Result; return userdata == null ? 0 : userdata.PlayCount; } @@ -46,5 +47,11 @@ namespace MediaBrowser.Server.Implementations.Sorting { get { return ItemSortBy.PlayCount; } } + + /// <summary> + /// Gets or sets the user manager. + /// </summary> + /// <value>The user manager.</value> + public IUserManager UserManager { get; set; } } } |
