Added the 'cacheSessions' config option
This commit is contained in:
parent
5a2fcea9df
commit
cbd6aa242e
|
@ -479,12 +479,13 @@ class Import:
|
|||
self.hhArchiveBase = node.getAttribute("hhArchiveBase")
|
||||
self.hhBulkPath = node.getAttribute("hhBulkPath")
|
||||
self.saveActions = string_to_bool(node.getAttribute("saveActions"), default=False)
|
||||
self.cacheSessions = string_to_bool(node.getAttribute("cacheSessions"), default=False)
|
||||
self.fastStoreHudCache = string_to_bool(node.getAttribute("fastStoreHudCache"), default=False)
|
||||
self.saveStarsHH = string_to_bool(node.getAttribute("saveStarsHH"), default=False)
|
||||
|
||||
def __str__(self):
|
||||
return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s\n saveActions = %s\n fastStoreHudCache = %s\n" \
|
||||
% (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.fastStoreHudCache)
|
||||
% (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.fastStoreHudCache)
|
||||
|
||||
class HudUI:
|
||||
def __init__(self, node):
|
||||
|
@ -1260,6 +1261,9 @@ class Config:
|
|||
try: imp['saveActions'] = self.imp.saveActions
|
||||
except: imp['saveActions'] = False
|
||||
|
||||
try: imp['cacheSessions'] = self.imp.cacheSessions
|
||||
except: imp['cacheSessions'] = False
|
||||
|
||||
try: imp['saveStarsHH'] = self.imp.saveStarsHH
|
||||
except: imp['saveStarsHH'] = False
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd">
|
||||
|
||||
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import>
|
||||
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True" cacheSessions="True"></import>
|
||||
|
||||
<!-- These values determine what stats are displayed in the HUD
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
config_difficulty="expert"
|
||||
/>
|
||||
|
||||
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import>
|
||||
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True" cacheSessions="True"></import>
|
||||
|
||||
<gui_cash_stats>
|
||||
<col col_name="game" disp_all="True" disp_posn="True" col_title="Game" xalignment="0.0" field_format="%s" field_type="str" />
|
||||
|
|
4
pyfpdb/fpdb_import.py
Executable file → Normal file
4
pyfpdb/fpdb_import.py
Executable file → Normal file
|
@ -83,6 +83,7 @@ class Importer:
|
|||
self.pos_in_file = {} # dict to remember how far we have read in the file
|
||||
#Set defaults
|
||||
self.callHud = self.config.get_import_parameters().get("callFpdbHud")
|
||||
self.cacheSessions = self.config.get_import_parameters().get("cacheSessions")
|
||||
|
||||
# CONFIGURATION OPTIONS
|
||||
self.settings.setdefault("minPrint", 30)
|
||||
|
@ -111,6 +112,9 @@ class Importer:
|
|||
def setCallHud(self, value):
|
||||
self.callHud = value
|
||||
|
||||
def setCacheSessions(self, value):
|
||||
self.cacheSessions = value
|
||||
|
||||
def setMinPrint(self, value):
|
||||
self.settings['minPrint'] = int(value)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user