fix update hud cache/auto import

This commit is contained in:
steffen123 2010-08-21 18:30:10 +02:00
parent ee7fc47dc1
commit 52d38020d2
2 changed files with 85 additions and 72 deletions

View File

@ -1769,86 +1769,95 @@ class Database:
#print "DEBUG: %s %s %s" %(hid, pids, pdata) #print "DEBUG: %s %s %s" %(hid, pids, pdata)
inserts = [] inserts = []
for p in pdata: for p in pdata:
line = [0]*76 line = [0]*85
line[0] = 1 # HDs line[0] = 1 # HDs
if pdata[p]['street0VPI']: line[1] = 1 if pdata[p]['street0VPI']: line[1] = 1
if pdata[p]['street0Aggr']: line[2] = 1 if pdata[p]['street0Aggr']: line[2] = 1
if pdata[p]['street0_3BChance']: line[3] = 1 if pdata[p]['street0_3BChance']: line[3] = 1
if pdata[p]['street0_3BDone']: line[4] = 1 if pdata[p]['street0_3BDone']: line[4] = 1
if pdata[p]['street1Seen']: line[5] = 1 if pdata[p]['street0_4BChance']: line[5] = 1
if pdata[p]['street2Seen']: line[6] = 1 if pdata[p]['street0_4BDone']: line[6] = 1
if pdata[p]['street3Seen']: line[7] = 1 if pdata[p]['other3BStreet0']: line[7] = 1
if pdata[p]['street4Seen']: line[8] = 1 if pdata[p]['other4BStreet0']: line[8] = 1
if pdata[p]['sawShowdown']: line[9] = 1 if pdata[p]['street1Seen']: line[9] = 1
if pdata[p]['street1Aggr']: line[10] = 1 if pdata[p]['street2Seen']: line[10] = 1
if pdata[p]['street2Aggr']: line[11] = 1 if pdata[p]['street3Seen']: line[11] = 1
if pdata[p]['street3Aggr']: line[12] = 1 if pdata[p]['street4Seen']: line[12] = 1
if pdata[p]['street4Aggr']: line[13] = 1 if pdata[p]['sawShowdown']: line[13] = 1
if pdata[p]['otherRaisedStreet1']: line[14] = 1 if pdata[p]['street1Aggr']: line[14] = 1
if pdata[p]['otherRaisedStreet2']: line[15] = 1 if pdata[p]['street2Aggr']: line[15] = 1
if pdata[p]['otherRaisedStreet3']: line[16] = 1 if pdata[p]['street3Aggr']: line[16] = 1
if pdata[p]['otherRaisedStreet4']: line[17] = 1 if pdata[p]['street4Aggr']: line[17] = 1
if pdata[p]['foldToOtherRaisedStreet1']: line[18] = 1 if pdata[p]['otherRaisedStreet0']: line[18] = 1
if pdata[p]['foldToOtherRaisedStreet2']: line[19] = 1 if pdata[p]['otherRaisedStreet1']: line[19] = 1
if pdata[p]['foldToOtherRaisedStreet3']: line[20] = 1 if pdata[p]['otherRaisedStreet2']: line[20] = 1
if pdata[p]['foldToOtherRaisedStreet4']: line[21] = 1 if pdata[p]['otherRaisedStreet3']: line[21] = 1
line[22] = pdata[p]['wonWhenSeenStreet1'] if pdata[p]['otherRaisedStreet4']: line[22] = 1
line[23] = pdata[p]['wonAtSD'] if pdata[p]['foldToOtherRaisedStreet0']: line[23] = 1
if pdata[p]['raiseFirstInChance']: line[24] = 1 if pdata[p]['foldToOtherRaisedStreet1']: line[24] = 1
if pdata[p]['raisedFirstIn']: line[25] = 1 if pdata[p]['foldToOtherRaisedStreet2']: line[25] = 1
if pdata[p]['foldBbToStealChance']: line[26] = 1 if pdata[p]['foldToOtherRaisedStreet3']: line[26] = 1
if pdata[p]['foldedBbToSteal']: line[27] = 1 if pdata[p]['foldToOtherRaisedStreet4']: line[27] = 1
if pdata[p]['foldSbToStealChance']: line[28] = 1 line[28] = pdata[p]['wonWhenSeenStreet1']
if pdata[p]['foldedSbToSteal']: line[29] = 1 line[29] = pdata[p]['wonWhenSeenStreet2']
if pdata[p]['street1CBChance']: line[30] = 1 line[30] = pdata[p]['wonWhenSeenStreet3']
if pdata[p]['street1CBDone']: line[31] = 1 line[31] = pdata[p]['wonWhenSeenStreet4']
if pdata[p]['street2CBChance']: line[32] = 1 line[32] = pdata[p]['wonAtSD']
if pdata[p]['street2CBDone']: line[33] = 1 if pdata[p]['raiseFirstInChance']: line[33] = 1
if pdata[p]['street3CBChance']: line[34] = 1 if pdata[p]['raisedFirstIn']: line[34] = 1
if pdata[p]['street3CBDone']: line[35] = 1 if pdata[p]['foldBbToStealChance']: line[35] = 1
if pdata[p]['street4CBChance']: line[36] = 1 if pdata[p]['foldedBbToSteal']: line[36] = 1
if pdata[p]['street4CBDone']: line[37] = 1 if pdata[p]['foldSbToStealChance']: line[37] = 1
if pdata[p]['foldToStreet1CBChance']: line[38] = 1 if pdata[p]['foldedSbToSteal']: line[38] = 1
if pdata[p]['foldToStreet1CBDone']: line[39] = 1 if pdata[p]['street1CBChance']: line[39] = 1
if pdata[p]['foldToStreet2CBChance']: line[40] = 1 if pdata[p]['street1CBDone']: line[40] = 1
if pdata[p]['foldToStreet2CBDone']: line[41] = 1 if pdata[p]['street2CBChance']: line[41] = 1
if pdata[p]['foldToStreet3CBChance']: line[42] = 1 if pdata[p]['street2CBDone']: line[42] = 1
if pdata[p]['foldToStreet3CBDone']: line[43] = 1 if pdata[p]['street3CBChance']: line[43] = 1
if pdata[p]['foldToStreet4CBChance']: line[44] = 1 if pdata[p]['street3CBDone']: line[44] = 1
if pdata[p]['foldToStreet4CBDone']: line[45] = 1 if pdata[p]['street4CBChance']: line[45] = 1
line[46] = pdata[p]['totalProfit'] if pdata[p]['street4CBDone']: line[46] = 1
if pdata[p]['street1CheckCallRaiseChance']: line[47] = 1 if pdata[p]['foldToStreet1CBChance']: line[47] = 1
if pdata[p]['street1CheckCallRaiseDone']: line[48] = 1 if pdata[p]['foldToStreet1CBDone']: line[48] = 1
if pdata[p]['street2CheckCallRaiseChance']: line[49] = 1 if pdata[p]['foldToStreet2CBChance']: line[49] = 1
if pdata[p]['street2CheckCallRaiseDone']: line[50] = 1 if pdata[p]['foldToStreet2CBDone']: line[50] = 1
if pdata[p]['street3CheckCallRaiseChance']: line[51] = 1 if pdata[p]['foldToStreet3CBChance']: line[51] = 1
if pdata[p]['street3CheckCallRaiseDone']: line[52] = 1 if pdata[p]['foldToStreet3CBDone']: line[52] = 1
if pdata[p]['street4CheckCallRaiseChance']: line[53] = 1 if pdata[p]['foldToStreet4CBChance']: line[53] = 1
if pdata[p]['street4CheckCallRaiseDone']: line[54] = 1 if pdata[p]['foldToStreet4CBDone']: line[54] = 1
if pdata[p]['street0Calls']: line[55] = 1 line[55] = pdata[p]['totalProfit']
if pdata[p]['street1Calls']: line[56] = 1 if pdata[p]['street1CheckCallRaiseChance']: line[56] = 1
if pdata[p]['street2Calls']: line[57] = 1 if pdata[p]['street1CheckCallRaiseDone']: line[57] = 1
if pdata[p]['street3Calls']: line[58] = 1 if pdata[p]['street2CheckCallRaiseChance']: line[58] = 1
if pdata[p]['street4Calls']: line[59] = 1 if pdata[p]['street2CheckCallRaiseDone']: line[59] = 1
if pdata[p]['street0Bets']: line[60] = 1 if pdata[p]['street3CheckCallRaiseChance']: line[60] = 1
if pdata[p]['street1Bets']: line[61] = 1 if pdata[p]['street3CheckCallRaiseDone']: line[61] = 1
if pdata[p]['street2Bets']: line[62] = 1 if pdata[p]['street4CheckCallRaiseChance']: line[62] = 1
if pdata[p]['street3Bets']: line[63] = 1 if pdata[p]['street4CheckCallRaiseDone']: line[63] = 1
if pdata[p]['street4Bets']: line[64] = 1 if pdata[p]['street0Calls']: line[64] = 1
if pdata[p]['street0Raises']: line[65] = 1 if pdata[p]['street1Calls']: line[65] = 1
if pdata[p]['street1Raises']: line[66] = 1 if pdata[p]['street2Calls']: line[66] = 1
if pdata[p]['street2Raises']: line[67] = 1 if pdata[p]['street3Calls']: line[67] = 1
if pdata[p]['street3Raises']: line[68] = 1 if pdata[p]['street4Calls']: line[68] = 1
if pdata[p]['street4Raises']: line[69] = 1 if pdata[p]['street0Bets']: line[69] = 1
if pdata[p]['street1Bets']: line[70] = 1
if pdata[p]['street2Bets']: line[71] = 1
if pdata[p]['street3Bets']: line[72] = 1
if pdata[p]['street4Bets']: line[73] = 1
if pdata[p]['street0Raises']: line[74] = 1
if pdata[p]['street1Raises']: line[75] = 1
if pdata[p]['street2Raises']: line[76] = 1
if pdata[p]['street3Raises']: line[77] = 1
if pdata[p]['street4Raises']: line[78] = 1
line[70] = gid # gametypeId line[79] = gid # gametypeId
line[71] = pids[p] # playerId line[80] = pids[p] # playerId
line[72] = len(pids) # activeSeats line[81] = len(pids) # activeSeats
pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' } pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' }
line[73] = pos[pdata[p]['position']] line[82] = pos[pdata[p]['position']]
line[74] = pdata[p]['tourneyTypeId'] line[83] = pdata[p]['tourneyTypeId']
line[75] = styleKey # styleKey line[84] = styleKey # styleKey
inserts.append(line) inserts.append(line)

View File

@ -3798,6 +3798,10 @@ class Sql:
street0Aggr=street0Aggr+%s, street0Aggr=street0Aggr+%s,
street0_3BChance=street0_3BChance+%s, street0_3BChance=street0_3BChance+%s,
street0_3BDone=street0_3BDone+%s, street0_3BDone=street0_3BDone+%s,
street0_4BChance=street0_4BChance+%s,
street0_4BDone=street0_4BDone+%s,
other3BStreet0=other3BStreet0+%s,
other4BStreet0=other4BStreet0+%s,
street1Seen=street1Seen+%s, street1Seen=street1Seen+%s,
street2Seen=street2Seen+%s, street2Seen=street2Seen+%s,
street3Seen=street3Seen+%s, street3Seen=street3Seen+%s,