fixes #583 - Add vote count to edit page

pull/702/head
Luke Pulverenti 11 years ago
parent 7c83e18453
commit f4ce062e0a

@ -224,6 +224,7 @@ namespace MediaBrowser.Api
item.DisplayMediaType = request.DisplayMediaType;
item.CommunityRating = request.CommunityRating;
item.VoteCount = request.VoteCount;
item.HomePageUrl = request.HomePageUrl;
item.IndexNumber = request.IndexNumber;
item.ParentIndexNumber = request.ParentIndexNumber;

@ -108,6 +108,12 @@ namespace MediaBrowser.Model.Dto
/// <value>The community rating.</value>
public float? CommunityRating { get; set; }
/// <summary>
/// Gets or sets the vote count.
/// </summary>
/// <value>The vote count.</value>
public int? VoteCount { get; set; }
/// <summary>
/// Gets or sets the original run time ticks.
/// </summary>

@ -160,7 +160,7 @@ namespace MediaBrowser.Providers.Movies
int voteCount;
if (!string.IsNullOrEmpty(result.imdbVotes)
&& int.TryParse(result.imdbVotes, NumberStyles.Integer, UsCulture, out voteCount)
&& int.TryParse(result.imdbVotes, NumberStyles.Number, UsCulture, out voteCount)
&& voteCount >= 0)
{
item.VoteCount = voteCount;
@ -169,7 +169,7 @@ namespace MediaBrowser.Providers.Movies
float imdbRating;
if (!string.IsNullOrEmpty(result.imdbRating)
&& float.TryParse(result.imdbRating, NumberStyles.Number, UsCulture, out imdbRating)
&& float.TryParse(result.imdbRating, NumberStyles.Any, UsCulture, out imdbRating)
&& imdbRating >= 0)
{
item.CommunityRating = imdbRating;

@ -905,6 +905,7 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.Type = item.GetType().Name;
dto.CommunityRating = item.CommunityRating;
dto.VoteCount = item.VoteCount;
if (item.IsFolder)
{

Loading…
Cancel
Save