From 00dd86ee19cf464c4cf4ea714f8e2efdd3f23734 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 17 Jun 2010 12:57:31 +0800 Subject: [PATCH 1/3] Fix sessionStats query to exclude tourney hands. --- pyfpdb/SQL.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index ad8ea025..24dee18e 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2632,25 +2632,6 @@ class Sql: GROUP BY h.handStart, hp.handId, hp.sawShowdown, hp.totalProfit ORDER BY h.handStart""" - #################################### - # Session stats query - #################################### - if db_server == 'mysql': - self.query['sessionStats'] = """ - SELECT UNIX_TIMESTAMP(h.handStart) as time, hp.handId, hp.startCash, hp.winnings, hp.totalProfit - FROM HandsPlayers hp - INNER JOIN Players pl ON (pl.id = hp.playerId) - INNER JOIN Hands h ON (h.id = hp.handId) - INNER JOIN Gametypes gt ON (gt.id = h.gametypeId) - WHERE pl.id in - AND pl.siteId in - AND h.handStart > '' - AND h.handStart < '' - - AND hp.tourneysPlayersId IS NULL - GROUP BY h.handStart, hp.handId, hp.totalProfit - ORDER BY h.handStart""" - #################################### # Session stats query #################################### @@ -2664,6 +2645,7 @@ class Sql: INNER JOIN Players p on (p.Id = hp.playerId) WHERE hp.playerId in AND date_format(h.handStart, '%Y-%m-%d') + AND hp.tourneysPlayersId IS NULL ORDER by time""" elif db_server == 'postgresql': self.query['sessionStats'] = """ @@ -2675,6 +2657,7 @@ class Sql: INNER JOIN Players p on (p.Id = hp.playerId) WHERE hp.playerId in AND h.handStart + AND hp.tourneysPlayersId IS NULL ORDER by time""" elif db_server == 'sqlite': self.query['sessionStats'] = """ @@ -2686,6 +2669,7 @@ class Sql: INNER JOIN Players p on (p.Id = hp.playerId) WHERE hp.playerId in AND h.handStart + AND hp.tourneysPlayersId IS NULL ORDER by time""" From 6189a67b1e091eb1b8487498e56b68dddc5cf2dd Mon Sep 17 00:00:00 2001 From: gimick Date: Thu, 17 Jun 2010 23:35:38 +0100 Subject: [PATCH 2/3] stop HUD_main window being closed. Temp fix to prevent lockup in .exe builds --- pyfpdb/HUD_main.pyw | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 92f888d8..c31c87d1 100755 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -98,7 +98,11 @@ class HUD_main(object): self.main_window = gtk.Window() self.main_window.connect("destroy", self.destroy) self.vb = gtk.VBox() - self.label = gtk.Label('Closing this window will exit from the HUD.') + #in .exe version, closing HUD_main window causes window lockup + #until next update cycle (i.e. cannot get focus on poker window while locked) + #temporary workaround to disable close button until fix is found + self.main_window.set_deletable(False) + self.label = gtk.Label(' To close, use "Stop Autoimport" in FPDB.') self.vb.add(self.label) self.main_window.add(self.vb) self.main_window.set_title("HUD Main Window") From 057a864794e3ebd1523dc019e0795c1288df635c Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 19 Jun 2010 08:42:49 +0800 Subject: [PATCH 3/3] Stars: Add 0.20/0.40 limit --- pyfpdb/PokerStarsToFpdb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 17a9b15c..89071ae7 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -145,6 +145,7 @@ class PokerStars(HandHistoryConverter): mg = m.groupdict() # translations from captured groups to fpdb info strings Lim_Blinds = { '0.04': ('0.01', '0.02'), '0.10': ('0.02', '0.05'), '0.20': ('0.05', '0.10'), + '0.80': ('0.20', '0.40'), '0.50': ('0.10', '0.25'), '1.00': ('0.25', '0.50'), '2.00': ('0.50', '1.00'), '2': ('0.50', '1.00'), '4': ('1.00', '2.00'), '6': ('1.00', '3.00'), '4.00': ('1.00', '2.00'), '6.00': ('1.00', '3.00'), '10.00': ('2.00', '5.00'),