recognise and store knockout and bounty
This commit is contained in:
parent
388097a412
commit
9ad275e11c
|
@ -1990,7 +1990,7 @@ class Database:
|
|||
#print "the query:",self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder'])
|
||||
cursor.execute (self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']),
|
||||
(hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO,
|
||||
hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix)
|
||||
hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix) #TODO: add koamount
|
||||
)
|
||||
result=cursor.fetchone()
|
||||
#print "result of fetching TT by details:",result
|
||||
|
@ -1999,8 +1999,8 @@ class Database:
|
|||
tourneyTypeId = result[0]
|
||||
except TypeError: #this means we need to create a new entry
|
||||
cursor.execute (self.sql.query['insertTourneyType'].replace('%s', self.sql.query['placeholder']),
|
||||
(hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.buyInChips,
|
||||
hand.isKO, hand.isRebuy,
|
||||
(hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'],
|
||||
hand.buyInChips, hand.isKO, hand.koBounty, hand.isRebuy,
|
||||
hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency)
|
||||
)
|
||||
tourneyTypeId = self.get_last_insert_id(cursor)
|
||||
|
|
|
@ -83,6 +83,7 @@ class Hand(object):
|
|||
self.isRebuy = False
|
||||
self.isAddOn = False
|
||||
self.isKO = False
|
||||
self.koBounty = None
|
||||
self.isMatrix = False
|
||||
self.isShootout = False
|
||||
self.added = None
|
||||
|
@ -168,6 +169,7 @@ class Hand(object):
|
|||
("IS REBUY", self.isRebuy),
|
||||
("IS ADDON", self.isAddOn),
|
||||
("IS KO", self.isKO),
|
||||
("KO BOUNTY", self.koBounty),
|
||||
("IS MATRIX", self.isMatrix),
|
||||
("IS SHOOTOUT", self.isShootout),
|
||||
("TOURNEY COMMENT", self.tourneyComment),
|
||||
|
|
|
@ -257,7 +257,8 @@ class PokerStars(HandHistoryConverter):
|
|||
hand.fee = int(100*Decimal(info['BOUNTY'][1:]))
|
||||
else:
|
||||
hand.fee = int(100*Decimal(info['BIRAKE'][1:]))
|
||||
# TODO: Bounty is in key 'BOUNTY'
|
||||
hand.isKO = True
|
||||
hand.koBounty = int(100*Decimal(info['BOUNTY'][1:]))
|
||||
else:
|
||||
hand.buyin = int(Decimal(info[key][0:-3]))
|
||||
hand.fee = 0
|
||||
|
|
|
@ -3786,9 +3786,9 @@ class Sql:
|
|||
"""
|
||||
|
||||
self.query['insertTourneyType'] = """INSERT INTO TourneyTypes
|
||||
(siteId, currency, buyin, fee, category, limitType, buyInChips, knockout, rebuy,
|
||||
(siteId, currency, buyin, fee, category, limitType, buyInChips, knockout, koBounty, rebuy,
|
||||
addOn ,speed, shootout, matrix, added, addedCurrency)
|
||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||
"""
|
||||
|
||||
self.query['getTourneyByTourneyNo'] = """SELECT t.*
|
||||
|
|
Loading…
Reference in New Issue
Block a user