From 4c37877c7fea98e3911cb25280be9f041d22b94c Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Tue, 2 Mar 2010 21:44:07 +0100 Subject: [PATCH 1/2] Uncalled bet needs to be subtracted from the collectees. the self.collectees is used in the derived stats. The uncalled part of the bet was added to the players profit. --- pyfpdb/PartyPokerToFpdb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index 5fdeae0c..c4f73813 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -260,6 +260,7 @@ class PartyPoker(HandHistoryConverter): for i,v in enumerate(self.collected): if v[0] in self.pot.returned: self.collected[i][1] = Decimal(v[1]) - self.pot.returned[v[0]] + self.collectees[v[0]] -= self.pot.returned[v[0]] return origTotalPot() return totalPot instancemethod = type(hand.totalPot) From 1e11109e1fd5749a86e26668333e443ce27d119e Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Tue, 2 Mar 2010 21:55:32 +0100 Subject: [PATCH 2/2] Support for new Hand History format for Party Poker Don't have enough 'old' HH to test --- pyfpdb/PartyPokerToFpdb.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index c4f73813..21344415 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -105,13 +105,20 @@ class PartyPoker(HandHistoryConverter): def guessMaxSeats(self, hand): """Return a guess at max_seats when not specified in HH.""" - mo = self.maxOccSeat(hand) - - if mo == 10: return mo - if mo == 2: return 2 - if mo <= 6: return 6 - # there are 9-max tables for cash and 10-max for tournaments - return 9 if hand.gametype['type']=='ring' else 10 + # Total number of players : 4/6 + re_seats = re.compile("""Total\s+number\s+of\s+players\s+\:\s+\d+.{1}(?P\d+)""" , re.VERBOSE) + try: + m = re_seats.search(hand.handText) + mo = m.groupdict() + mo = _mo['SEATS'] + return mo + except: + mo = self.maxOccSeat(hand) + if mo == 10: return mo + if mo == 2: return 2 + if mo <= 6: return 6 + # there are 9-max tables for cash and 10-max for tournaments + return 9 if hand.gametype['type']=='ring' else 10 def compilePlayerRegexs(self, hand): players = set([player[1] for player in hand.players])