diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index c0115bd9..028097dd 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -74,7 +74,7 @@ except ImportError: use_numpy = False -DB_VERSION = 137 +DB_VERSION = 138 # Variance created as sqlite has a bunch of undefined aggregate functions. diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index f0f1f834..7aab6c98 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -59,6 +59,7 @@ class DerivedStats(): self.handsplayers[player[1]]['foldSbToStealChance'] = False self.handsplayers[player[1]]['foldedSbToSteal'] = False self.handsplayers[player[1]]['foldedBbToSteal'] = False + self.handsplayers[player[1]]['tourneyTypeId'] = None for i in range(5): self.handsplayers[player[1]]['street%dCalls' % i] = 0 @@ -142,6 +143,7 @@ class DerivedStats(): self.handsplayers[player[1]]['startCash'] = int(100 * Decimal(player[2])) self.handsplayers[player[1]]['sitout'] = False #TODO: implement actual sitout detection if hand.gametype["type"]=="tour": + self.handsplayers[player[1]]['tourneyTypeId']=hand.tourneyTypeId self.handsplayers[player[1]]['tourneysPlayersIds'] = hand.tourneysPlayersIds[player[1]] else: self.handsplayers[player[1]]['tourneysPlayersIds'] = None diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index b16980ed..a069d89c 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -146,13 +146,14 @@ or None if we fail to get the info """ tourno = t.group('TOURNO') hand.tourNo = tourno hand.tablename = t.group('TABLE') + #TODO we should fetch info including buyincurrency, buyin and fee from URL: + # https://www.poker4ever.com/tourney/%TOURNEY_NUMBER% # Believe Everleaf time is GMT/UTC, no transation necessary # Stars format (Nov 10 2008): 2008/11/07 12:38:49 CET [2008/11/07 7:38:49 ET] # or : 2008/11/07 12:38:49 ET # Not getting it in my HH files yet, so using # 2008/11/10 3:58:52 ET - #TODO: Do conversion from GMT to ET #TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%Y/%m/%d - %H:%M:%S") return diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 290f2f42..93b6fe00 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -203,9 +203,9 @@ class Fulltilt(HandHistoryConverter): hand.tablename = m.group('TABLE') try: - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M:%S ET - %Y/%m/%d") except: - hand.starttime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M ET - %a, %B %d, %Y") + hand.startTime = datetime.datetime.strptime(m.group('DATETIME'), "%H:%M ET - %a, %B %d, %Y") hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, "ET", "UTC") diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 041ae981..4a0bde21 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -392,9 +392,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), siteId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyIn INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyIn INT, + fee INT, category varchar(9) NOT NULL, limitType char(2) NOT NULL, buyInChips INT, @@ -423,9 +423,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SERIAL, PRIMARY KEY (id), siteId INT NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyin INT, + fee INT, category varchar(9), limitType char(2), buyInChips INT, @@ -453,9 +453,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id INTEGER PRIMARY KEY, siteId INT NOT NULL, - currency VARCHAR(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency VARCHAR(4), + buyin INT, + fee INT, category TEXT, limitType TEXT, buyInChips INT, diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index a51ef932..67262ba7 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -117,7 +117,7 @@ import Configuration import Exceptions import Stats -VERSION = "0.20.901" +VERSION = "0.20.901 plus git" class fpdb: