banshee r4206 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Database



Author: gburt
Date: Fri Jun 27 17:34:03 2008
New Revision: 4206
URL: http://svn.gnome.org/viewvc/banshee?rev=4206&view=rev

Log:
2008-06-27  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs: Fix
	bug I introduced yesterday for people starting w/ no db.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs	Fri Jun 27 17:34:03 2008
@@ -47,7 +47,7 @@
         public BansheeDbConnection () : base (DatabaseFile)
         {
             // Each cache page is about 1.5K, so 32768 pages = 49152K = 48M
-            int cache_size = Query<long> ("SELECT COUNT(*) FROM CoreTracks") > 10000 ? 32768 : 16384;
+            int cache_size = (TableExists ("CoreTracks") && Query<long> ("SELECT COUNT(*) FROM CoreTracks") > 10000) ? 32768 : 16384;
             Execute ("PRAGMA cache_size = ?", cache_size);
             Execute ("PRAGMA synchronous = OFF");
             Execute ("PRAGMA temp_store = MEMORY");



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