def _save_steam_id(sess, steam_id_64): steamid = get_player(sess, steam_id_64) if not steamid: steamid = PlayerSteamID(steam_id_64=steam_id_64) sess.add(steamid) logger.info("Adding first time seen steamid %s", steam_id_64) sess.commit() return steamid
def update_db_player_info(player: PlayerSteamID, steam_profile): if not player.steaminfo: player.steaminfo = SteamInfo() player.steaminfo.profile = steam_profile player.steaminfo.country = steam_profile.get('loccountrycode')