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

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-09-09 15:06:56 -04:00
parent 2441ba0c6d
commit 8530e69878
5 changed files with 1 additions and 51 deletions

View File

@ -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));
}
}

View File

@ -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>

View File

@ -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>

View File

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

View File

@ -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
}
}