fix import for non-KO tourneys
This commit is contained in:
parent
14588b3bf9
commit
388097a412
|
@ -72,7 +72,7 @@ class PokerStars(HandHistoryConverter):
|
|||
(Tournament\s\# # open paren of tournament info
|
||||
(?P<TOURNO>\d+),\s
|
||||
# here's how I plan to use LS
|
||||
(?P<BUYIN>(?P<BIAMT>[%(LS)s\d\.]+)\+(?P<BOUNTY>[%(LS)s\d\.]+)?\+(?P<BIRAKE>[%(LS)s\d\.]+)\s?(?P<TOUR_ISO>%(LEGAL_ISO)s)|Freeroll)\s+)?
|
||||
(?P<BUYIN>(?P<BIAMT>[%(LS)s\d\.]+)\+(?P<BOUNTY>[%(LS)s\d\.]+)?\+?(?P<BIRAKE>[%(LS)s\d\.]+)\s?(?P<TOUR_ISO>%(LEGAL_ISO)s)|Freeroll)\s+)?
|
||||
# close paren of tournament info
|
||||
(?P<MIXED>HORSE|8\-Game|HOSE)?\s?\(?
|
||||
(?P<GAME>Hold\'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
|
||||
|
@ -251,11 +251,14 @@ class PokerStars(HandHistoryConverter):
|
|||
#FIXME: handle other currencies, FPP, play money
|
||||
raise FpdbParseError("failed to detect currency")
|
||||
|
||||
if hand.buyinCurrency=="USD" or hand.buyinCurrency=="EUR":
|
||||
if hand.buyinCurrency!="PSFP":
|
||||
hand.buyin = int(100*Decimal(info['BIAMT'][1:]))
|
||||
hand.fee = int(100*Decimal(info['BIRAKE'][1:]))
|
||||
if info['BIRAKE']=="0": #we have a non-bounty game
|
||||
hand.fee = int(100*Decimal(info['BOUNTY'][1:]))
|
||||
else:
|
||||
hand.fee = int(100*Decimal(info['BIRAKE'][1:]))
|
||||
# TODO: Bounty is in key 'BOUNTY'
|
||||
elif hand.buyinCurrency=="PSFP":
|
||||
else:
|
||||
hand.buyin = int(Decimal(info[key][0:-3]))
|
||||
hand.fee = 0
|
||||
if key == 'LEVEL':
|
||||
|
|
Loading…
Reference in New Issue
Block a user