diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-05-28 12:22:38 -0400 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-05-28 12:22:38 -0400 |
| commit | 61c4d87a16028c07ee6781869b7896c2691f680c (patch) | |
| tree | d6ac63873640551328f2c2702c096ca70ad877ad | |
| parent | feb598c0333b85e0c33f9f25854e7085bdc18803 (diff) | |
Ensure we interpret decimal points in ratings properly regardless of culture
| -rw-r--r-- | MediaBrowser.Controller/Providers/BaseItemXmlParser.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs index 8f4d33bb5..337eb9527 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; } |
