[chronojump] DB:0.86 videoOn by default



commit 023b1ec9d7e9b25891cc11882ef9038a8882eb93
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jan 4 04:25:49 2013 +0100

    DB:0.86 videoOn by default

 src/sqlite/main.cs        |   13 ++++++++++++-
 src/sqlite/preferences.cs |    2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 67dabd2..86a7d14 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -72,7 +72,7 @@ class Sqlite
 	 * Important, change this if there's any update to database
 	 * Important2: if database version get numbers higher than 1, check if the comparisons with currentVersion works ok
 	 */
-	static string lastChronojumpDatabaseVersion = "0.85";
+	static string lastChronojumpDatabaseVersion = "0.86";
 
 	public Sqlite() {
 	}
@@ -1163,6 +1163,16 @@ class Sqlite
 				dbcon.Close();
 				currentVersion = "0.85";
 			}
+			if(currentVersion == "0.85") {
+				dbcon.Open();
+				Log.WriteLine("Converted DB to 0.86 videoOn: TRUE"); 
+
+				SqlitePreferences.Update("videoOn", "True", true);
+				SqlitePreferences.Update ("databaseVersion", "0.86", true); 
+				
+				dbcon.Close();
+				currentVersion = "0.86";
+			}
 		}
 
 		//if changes are made here, remember to change also in CreateTables()
@@ -1301,6 +1311,7 @@ class Sqlite
 		SqliteCountry.initialize();
 		
 		//changes [from - to - desc]
+		//0.85 - 0.86 Converted DB to 0.86 videoOn: TRUE
 		//0.84 - 0.85 Converted DB to 0.85 Added slCMJ jump 
 		//0.83 - 0.84 Converted DB to 0.84 Added first RSA test 
 		//0.82 - 0.83 Converted DB to 0.83 Created encoder table
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 770c1ba..4f0d853 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -59,7 +59,7 @@ class SqlitePreferences : Sqlite
 		Insert ("language", "es-ES"); 
 		Insert ("allowFinishRjAfterTime", "True"); 
 		Insert ("volumeOn", "True"); 
-		Insert ("videoOn", "False"); 
+		Insert ("videoOn", "True"); 
 		Insert ("evaluatorServerID", "-1");
 		Insert ("versionAvailable", "");
 		



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