def convert_all_xml_to_db(self): gdh = GameDataHandlerCompat(self) games = gdh.get_game_names() for game in games: print "converting", game gamedata = gdh.get_game_data(game) installed = gdh.get_installed_files(game) self.game_datahandler.add_new_game(gamedata, installed)
def generate_main_objects(self): # setup objects self.upgrade_to_db_required = False self._dbfile = self.datadir / "main.db" if not self._dbfile.exists(): print "no database file exists." # test for xml files gdh = GameDataHandlerCompat(self) games = gdh.get_game_names() if games: self.upgrade_to_db_required = True self.conn = Connection(self._dbfile) # self.game_datahandler = self.make_new_datahandler() self.game_datahandler = GameDataBaseCompat(self.conn) self.game_datahandler.set_screenshots_path(self.data_directories["screenshots"]) self.game_fileshandler = self.make_new_fileshandler() self.dosbox = self.make_new_dosbox_object()