banshee r4992 - in trunk/banshee: . src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks



Author: blorentz
Date: Sat Jan 31 15:30:08 2009
New Revision: 4992
URL: http://svn.gnome.org/viewvc/banshee?rev=4992&view=rev

Log:
2009-01-31  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks/BookmarksService.cs:
	Explicitly convert integers coming from the DB, as Mono.Data.Sqlite
	returns them as Int64 (BGO #569966).



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks/BookmarksService.cs

Modified: trunk/banshee/src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks/BookmarksService.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks/BookmarksService.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Bookmarks/Banshee.Bookmarks/BookmarksService.cs	Sat Jan 31 15:30:08 2009
@@ -315,12 +315,12 @@
             while (reader.Read()) {
                 try {
                     bookmarks.Add(new Bookmark(
-                        (int) reader[0], (int) reader[1], (uint)(int) reader[2],
+                        reader.GetInt32 (0), reader.GetInt32 (1), Convert.ToUInt32 (reader[2]),
                         DateTimeUtil.ToDateTime(Convert.ToInt64(reader[3]))
                     ));
                 } catch (Exception e) {
                     ServiceManager.DbConnection.Execute(String.Format(
-                        "DELETE FROM Bookmarks WHERE BookmarkID = {0}", (int)reader[0]
+                        "DELETE FROM Bookmarks WHERE BookmarkID = {0}", reader.GetInt32 (0)
                     ));
 
                     Log.Warning("Error Loading Bookmark", e.ToString(), false);



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