Selaa lähdekoodia

Removed user item rating mode for now - it's too much work for the ui devs

LukePulverenti Luke Pulverenti luke pulverenti 13 vuotta sitten
vanhempi
sitoutus
8530e69878

+ 1 - 8
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<DTOUserItemData>(ApiService.GetDTOUserItemData(data));
         }
     }

+ 0 - 13
MediaBrowser.ApiInteraction.Portable/ApiClient.cs

@@ -412,19 +412,6 @@ namespace MediaBrowser.ApiInteraction.Portable
             GetDataAsync(url, callback);
         }
 
-        /// <summary>
-        /// Updates a user's rating for an item, based on a numeric scale
-        /// </summary>
-        public void UpdateUserItemRatingAsync(Guid itemId, Guid userId, float value, Action<DTOUserItemData> callback)
-        {
-            string url = ApiUrl + "/UserItemRating?id=" + itemId;
-
-            url += "&userid=" + userId;
-            url += "&value=" + value;
-
-            GetDataAsync(url, callback);
-        }
-
         /// <summary>
         /// Updates a user's rating for an item, based on likes or dislikes
         /// </summary>

+ 0 - 16
MediaBrowser.ApiInteraction/BaseHttpApiClient.cs

@@ -470,22 +470,6 @@ namespace MediaBrowser.ApiInteraction
             }
         }
 
-        /// <summary>
-        /// Updates a user's rating for an item, based on a numeric scale
-        /// </summary>
-        public async Task<DTOUserItemData> 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<DTOUserItemData>(stream);
-            }
-        }
-
         /// <summary>
         /// Updates a user's rating for an item, based on likes or dislikes
         /// </summary>

+ 0 - 3
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; }
     }
 }

+ 0 - 11
MediaBrowser.Model/Entities/User.cs

@@ -17,16 +17,5 @@ namespace MediaBrowser.Model.Entities
 
         public DateTime? LastLoginDate { get; set; }
         public DateTime? LastActivityDate { get; set; }
-
-        /// <summary>
-        /// This allows the user to configure how they want to rate items
-        /// </summary>
-        public ItemRatingMode ItemRatingMode { get; set; }
-    }
-
-    public enum ItemRatingMode
-    {
-        LikeOrDislike,
-        Numeric
     }
 }