def getEndSignal(mysql: MySQLWrapper): mysql.query("SELECT Value FROM Signals WHERE SignalName='End';") results = mysql.fetchResults() if results is None or results[0][0] == 1: return True else: return False
def getRefreshTime(mysql: MySQLWrapper): mysql.query("SELECT Value FROM Signals WHERE SignalName='Refresh';") results = mysql.fetchResults() if results is None: return 30 else: return results[0][0]
def getSQLID(self, mysql: MySQLWrapper): mysql.query( "SELECT ThreadID FROM Threads WHERE HLTVID=%s;", (self.hltvID,) ) result = mysql.fetchResults() if result is None: return None else: return result[0][0]
def getSQLID(self, mysql: MySQLWrapper): mysql.query( "SELECT PostID FROM Posts WHERE HLTVID=%s;", (self.getHLTVID(),) ) result = mysql.fetchResults() if result is None: return None else: return result[0][0]
def getForums(mysql: MySQLWrapper): mysql.query("SELECT ForumID, HLTVID, Name FROM Forums;") results = mysql.fetchResults() if results is None: return [] else: forums = [] for row in results: forumInfo = Forum( sqlID = row[0], hltvID = row[1], name = row[2] ) if '/' in forumInfo.hltvID: forums += [forumInfo] return forums