def load(self): """Return importable Steam games""" if self.is_loading: logger.warning("Steam games are already loading") return self.is_loading = True self.emit("service-games-load") steam_dir = get_steam_dir() for steam_game in get_steam_library(get_user_steam_id(steam_dir)): game = SteamGame.new_from_steam_game(steam_game) game.save() self.match_games() self.is_loading = False logger.debug("Steam games loaded") self.emit("service-games-loaded")
def load(self): """Return importable Steam games""" if self.is_loading: logger.warning("Steam games are already loading") return self.is_loading = True self.emit("service-games-load") steam_dir = get_steam_dir() steamid = get_user_steam_id(steam_dir) if not steamid: logger.error("Unable to find SteamID from Steam config") self.emit("service-games-loaded") return for steam_game in get_steam_library(steamid): game = SteamGame.new_from_steam_game(steam_game) game.save() self.match_games() self.is_loading = False logger.debug("Steam games loaded") self.emit("service-games-loaded")
def steam_data_dir(self): """Main installation directory for Steam""" return get_steam_dir()