fixes #583 - Add vote count to edit page

This commit is contained in:
Luke Pulverenti 2013-10-13 10:37:17 -04:00
parent 7c83e18453
commit f4ce062e0a
4 changed files with 10 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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