From 61c4d87a16028c07ee6781869b7896c2691f680c Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Tue, 28 May 2013 12:22:38 -0400 Subject: [PATCH] Ensure we interpret decimal points in ratings properly regardless of culture --- MediaBrowser.Controller/Providers/BaseItemXmlParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs index 8f4d33bb56..337eb95274 100644 --- a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs +++ b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs @@ -363,8 +363,8 @@ namespace MediaBrowser.Controller.Providers if (!string.IsNullOrWhiteSpace(rating)) { float val; - - if (float.TryParse(rating, out val)) + // All external meta is saving this as '.' for decimal I believe...but just to be sure + if (float.TryParse(rating.Replace(',','.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out val)) { item.CommunityRating = val; }