banshee r4232 - in trunk/banshee: . src/Libraries/Lastfm/Lastfm.Data



Author: gburt
Date: Sun Jul 20 21:34:27 2008
New Revision: 4232
URL: http://svn.gnome.org/viewvc/banshee?rev=4232&view=rev

Log:
2008-07-20  Gabriel Burt  <gabriel burt gmail com>

	* src/Libraries/Lastfm/Lastfm.Data/DataEntry.cs: Patch from Arthur Carli
	fixing issue with parsing percentages from Last.fm without culture
	invariant info (BGO #539528).



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Lastfm/Lastfm.Data/DataEntry.cs

Modified: trunk/banshee/src/Libraries/Lastfm/Lastfm.Data/DataEntry.cs
==============================================================================
--- trunk/banshee/src/Libraries/Lastfm/Lastfm.Data/DataEntry.cs	(original)
+++ trunk/banshee/src/Libraries/Lastfm/Lastfm.Data/DataEntry.cs	Sun Jul 20 21:34:27 2008
@@ -27,6 +27,7 @@
 //
 
 using System;
+using System.Globalization;
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
@@ -55,7 +56,7 @@
             try {
                 XmlElement node = root[name];
                 if (node != null) {
-                    return (T) Convert.ChangeType (node.InnerText, typeof(T));
+                    return (T) Convert.ChangeType (node.InnerText, typeof(T), CultureInfo.InvariantCulture);
                 } else if (root.HasAttribute (name)) {
                     return (T) Convert.ChangeType (root.GetAttribute (name), typeof(T));
                 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]