From 8530e698782d16517359f594575bf9bfbb5cd6bb Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sun, 9 Sep 2012 15:06:56 -0400 Subject: [PATCH] Removed user item rating mode for now - it's too much work for the ui devs --- .../HttpHandlers/UserItemRatingHandler.cs | 9 +-------- .../ApiClient.cs | 13 ------------- MediaBrowser.ApiInteraction/BaseHttpApiClient.cs | 16 ---------------- MediaBrowser.Model/DTO/DTOUser.cs | 3 --- MediaBrowser.Model/Entities/User.cs | 11 ----------- 5 files changed, 1 insertion(+), 51 deletions(-) diff --git a/MediaBrowser.Api/HttpHandlers/UserItemRatingHandler.cs b/MediaBrowser.Api/HttpHandlers/UserItemRatingHandler.cs index 6f3908d051..a83bb07f78 100644 --- a/MediaBrowser.Api/HttpHandlers/UserItemRatingHandler.cs +++ b/MediaBrowser.Api/HttpHandlers/UserItemRatingHandler.cs @@ -41,18 +41,11 @@ namespace MediaBrowser.Api.HttpHandlers data.Rating = null; } - // If the user's rating mode is set to like/dislike - else if (user.ItemRatingMode == ItemRatingMode.LikeOrDislike) + else { data.Likes = QueryString["likes"] == "1"; } - // If the user's rating mode is set to numeric - else if (user.ItemRatingMode == ItemRatingMode.Numeric) - { - data.Rating = float.Parse(QueryString["value"]); - } - return Task.FromResult(ApiService.GetDTOUserItemData(data)); } } diff --git a/MediaBrowser.ApiInteraction.Portable/ApiClient.cs b/MediaBrowser.ApiInteraction.Portable/ApiClient.cs index d83c6b1a6e..5c79a04ed0 100644 --- a/MediaBrowser.ApiInteraction.Portable/ApiClient.cs +++ b/MediaBrowser.ApiInteraction.Portable/ApiClient.cs @@ -412,19 +412,6 @@ namespace MediaBrowser.ApiInteraction.Portable GetDataAsync(url, callback); } - /// - /// Updates a user's rating for an item, based on a numeric scale - /// - public void UpdateUserItemRatingAsync(Guid itemId, Guid userId, float value, Action callback) - { - string url = ApiUrl + "/UserItemRating?id=" + itemId; - - url += "&userid=" + userId; - url += "&value=" + value; - - GetDataAsync(url, callback); - } - /// /// Updates a user's rating for an item, based on likes or dislikes /// diff --git a/MediaBrowser.ApiInteraction/BaseHttpApiClient.cs b/MediaBrowser.ApiInteraction/BaseHttpApiClient.cs index b6a4539ee2..7468b60391 100644 --- a/MediaBrowser.ApiInteraction/BaseHttpApiClient.cs +++ b/MediaBrowser.ApiInteraction/BaseHttpApiClient.cs @@ -470,22 +470,6 @@ namespace MediaBrowser.ApiInteraction } } - /// - /// Updates a user's rating for an item, based on a numeric scale - /// - public async Task UpdateUserItemRatingAsync(Guid itemId, Guid userId, float value) - { - string url = ApiUrl + "/UserItemRating?id=" + itemId; - - url += "&userid=" + userId; - url += "&value=" + value; - - using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) - { - return DeserializeFromStream(stream); - } - } - /// /// Updates a user's rating for an item, based on likes or dislikes /// diff --git a/MediaBrowser.Model/DTO/DTOUser.cs b/MediaBrowser.Model/DTO/DTOUser.cs index 802bc8d8d8..be13825f0b 100644 --- a/MediaBrowser.Model/DTO/DTOUser.cs +++ b/MediaBrowser.Model/DTO/DTOUser.cs @@ -24,8 +24,5 @@ namespace MediaBrowser.Model.DTO [ProtoMember(6)] public DateTime? LastActivityDate { get; set; } - - [ProtoMember(7)] - public ItemRatingMode ItemRatingMode { get; set; } } } diff --git a/MediaBrowser.Model/Entities/User.cs b/MediaBrowser.Model/Entities/User.cs index 68e130c7a3..3c6117fca8 100644 --- a/MediaBrowser.Model/Entities/User.cs +++ b/MediaBrowser.Model/Entities/User.cs @@ -17,16 +17,5 @@ namespace MediaBrowser.Model.Entities public DateTime? LastLoginDate { get; set; } public DateTime? LastActivityDate { get; set; } - - /// - /// This allows the user to configure how they want to rate items - /// - public ItemRatingMode ItemRatingMode { get; set; } - } - - public enum ItemRatingMode - { - LikeOrDislike, - Numeric } }