From dc2b315a9f7078783ff9a71b55561560d66ff6da Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 3 Aug 2010 19:52:49 +0800 Subject: [PATCH] Stars: Fix FPP tourneys (maybe...) Also move hand.isKO to the correct place --- pyfpdb/PokerStarsToFpdb.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 80d48b6b..384f5082 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -72,7 +72,7 @@ class PokerStars(HandHistoryConverter): (Tournament\s\# # open paren of tournament info (?P\d+),\s # here's how I plan to use LS - (?P(?P[%(LS)s\d\.]+)?\+(?P[%(LS)s\d\.]+)?\+?(?P[%(LS)s\d\.]+)?\s?(?P%(LEGAL_ISO)s)?|Freeroll)\s+)? + (?P(?P[%(LS)s\d\.]+)?\+?(?P[%(LS)s\d\.]+)?\+?(?P[%(LS)s\d\.]+)?\s?(?P%(LEGAL_ISO)s)?|Freeroll)\s+)? # close paren of tournament info (?PHORSE|8\-Game|HOSE)?\s?\(? (?PHold\'em|Razz|RAZZ|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s @@ -250,6 +250,8 @@ class PokerStars(HandHistoryConverter): else: #FIXME: handle other currencies, FPP, play money raise FpdbParseError("failed to detect currency") + + info['BIAMT'] = info['BIAMT'].strip(u'$€FPP') if hand.buyinCurrency!="PSFP": if info['BOUNTY'] != None: @@ -259,15 +261,14 @@ class PokerStars(HandHistoryConverter): info['BIRAKE'] = tmp info['BOUNTY'] = info['BOUNTY'].strip(u'$€') # Strip here where it isn't 'None' hand.koBounty = int(100*Decimal(info['BOUNTY'])) + hand.isKO = True - info['BIAMT'] = info['BIAMT'].strip(u'$€') info['BIRAKE'] = info['BIRAKE'].strip(u'$€') hand.buyin = int(100*Decimal(info['BIAMT'])) hand.fee = int(100*Decimal(info['BIRAKE'])) - hand.isKO = True else: - hand.buyin = int(Decimal(info[key][0:-3])) + hand.buyin = int(Decimal(info['BIAMT'])) hand.fee = 0 if key == 'LEVEL': hand.level = info[key]