From 460706fd74924f3d866b9c2aa55c780ad747065b Mon Sep 17 00:00:00 2001 From: solis Date: Mon, 11 Feb 2019 14:15:46 +1030 Subject: [PATCH 1/4] d --- objects/score.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objects/score.pyx b/objects/score.pyx index 56f2fbb..f12968c 100644 --- a/objects/score.pyx +++ b/objects/score.pyx @@ -248,10 +248,10 @@ class score: Save this score in DB (if passed and mods are valid) """ # Add this score - if self.completed >= 2: - query = "INSERT INTO scores (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" + + query = "INSERT INTO scores (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) - + if self.completed >= 2: # Set old personal best to completed = 2 if self.oldPersonalBest != 0: glob.db.execute("UPDATE scores SET completed = 2 WHERE id = %s", [self.oldPersonalBest]) From 37f7182ecefbdd3326fe4edcbd158f734ee20601 Mon Sep 17 00:00:00 2001 From: solis Date: Mon, 11 Feb 2019 14:16:09 +1030 Subject: [PATCH 2/4] d --- objects/rxscore.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objects/rxscore.pyx b/objects/rxscore.pyx index 7036320..0bdd196 100644 --- a/objects/rxscore.pyx +++ b/objects/rxscore.pyx @@ -249,10 +249,10 @@ class score: Save this score in DB (if passed and mods are valid) """ # Add this score - if self.completed >= 2: - query = "INSERT INTO scores_relax (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" + + query = "INSERT INTO scores_relax (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) - + if self.completed >= 2: # Set old personal best to completed = 2 if self.oldPersonalBest != 0: glob.db.execute("UPDATE scores_relax SET completed = 2 WHERE id = %s", [self.oldPersonalBest]) From 87b94c248a0c2e61ec48fd40da26ab2749e5ab8e Mon Sep 17 00:00:00 2001 From: solis Date: Mon, 11 Feb 2019 14:27:12 +1030 Subject: [PATCH 3/4] L --- objects/rxscore.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/rxscore.pyx b/objects/rxscore.pyx index 0bdd196..36bee2f 100644 --- a/objects/rxscore.pyx +++ b/objects/rxscore.pyx @@ -251,7 +251,7 @@ class score: # Add this score query = "INSERT INTO scores_relax (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" - self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) + self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) if self.completed >= 2: # Set old personal best to completed = 2 if self.oldPersonalBest != 0: From b253e7460e67ce457d1e8a5da9b7060854e5ceee Mon Sep 17 00:00:00 2001 From: solis Date: Mon, 11 Feb 2019 14:27:27 +1030 Subject: [PATCH 4/4] WHY --- objects/score.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/score.pyx b/objects/score.pyx index f12968c..53aa444 100644 --- a/objects/score.pyx +++ b/objects/score.pyx @@ -250,7 +250,7 @@ class score: # Add this score query = "INSERT INTO scores (id, beatmap_md5, userid, score, max_combo, full_combo, mods, 300_count, 100_count, 50_count, katus_count, gekis_count, misses_count, time, play_mode, completed, accuracy, pp) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);" - self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) + self.scoreID = int(glob.db.execute(query, [self.fileMd5, userUtils.getID(self.playerName), self.score, self.maxCombo, 1 if self.fullCombo == True else 0, self.mods, self.c300, self.c100, self.c50, self.cKatu, self.cGeki, self.cMiss, self.playDateTime, self.gameMode, self.completed, self.accuracy * 100, self.pp])) if self.completed >= 2: # Set old personal best to completed = 2 if self.oldPersonalBest != 0: