mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
save vote count in xml
This commit is contained in:
parent
05378c82cb
commit
7c83e18453
@ -566,7 +566,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
int num;
|
||||
// All external meta is saving this as '.' for decimal I believe...but just to be sure
|
||||
|
||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num))
|
||||
{
|
||||
var game = item as Game;
|
||||
@ -578,6 +578,20 @@ namespace MediaBrowser.Controller.Providers
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "VoteCount":
|
||||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
int num;
|
||||
|
||||
if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num))
|
||||
{
|
||||
item.VoteCount = num;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "GameSystem":
|
||||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
@ -66,6 +66,7 @@ namespace MediaBrowser.Providers.Savers
|
||||
"TVcomId",
|
||||
"TvDbId",
|
||||
"Type",
|
||||
"VoteCount",
|
||||
"Website",
|
||||
"Zap2ItId"
|
||||
|
||||
@ -281,6 +282,10 @@ namespace MediaBrowser.Providers.Savers
|
||||
{
|
||||
builder.Append("<Rating>" + SecurityElement.Escape(item.CommunityRating.Value.ToString(UsCulture)) + "</Rating>");
|
||||
}
|
||||
if (item.VoteCount.HasValue)
|
||||
{
|
||||
builder.Append("<VoteCount>" + SecurityElement.Escape(item.VoteCount.Value.ToString(UsCulture)) + "</VoteCount>");
|
||||
}
|
||||
|
||||
if (item.ProductionYear.HasValue && !(item is Person))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user