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

pull/702/head
LukePulverenti Luke Pulverenti luke pulverenti 12 years ago
parent 2441ba0c6d
commit 8530e69878

@ -41,18 +41,11 @@ namespace MediaBrowser.Api.HttpHandlers
data.Rating = null; data.Rating = null;
} }
// If the user's rating mode is set to like/dislike else
else if (user.ItemRatingMode == ItemRatingMode.LikeOrDislike)
{ {
data.Likes = QueryString["likes"] == "1"; 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)); return Task.FromResult<DTOUserItemData>(ApiService.GetDTOUserItemData(data));
} }
} }

@ -412,19 +412,6 @@ namespace MediaBrowser.ApiInteraction.Portable
GetDataAsync(url, callback); 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> /// <summary>
/// Updates a user's rating for an item, based on likes or dislikes /// Updates a user's rating for an item, based on likes or dislikes
/// </summary> /// </summary>

@ -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> /// <summary>
/// Updates a user's rating for an item, based on likes or dislikes /// Updates a user's rating for an item, based on likes or dislikes
/// </summary> /// </summary>

@ -24,8 +24,5 @@ namespace MediaBrowser.Model.DTO
[ProtoMember(6)] [ProtoMember(6)]
public DateTime? LastActivityDate { get; set; } public DateTime? LastActivityDate { get; set; }
[ProtoMember(7)]
public ItemRatingMode ItemRatingMode { get; set; }
} }
} }

@ -17,16 +17,5 @@ namespace MediaBrowser.Model.Entities
public DateTime? LastLoginDate { get; set; } public DateTime? LastLoginDate { get; set; }
public DateTime? LastActivityDate { 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
} }
} }

Loading…
Cancel
Save