def _steam_command(command, game_id): if game_id == "499450": game_id = "292030" if is_uri_handler_installed("steam"): webbrowser.open("steam://{}/{}".format(command, game_id)) else: webbrowser.open("https://store.steampowered.com/about/")
async def launch_game(self, game_id): if is_uri_handler_installed("origin2"): await OriginPlugin._open_uri( "origin2://game/launch?offerIds={}&autoDownload=true".format( game_id)) else: await OriginPlugin._open_uri("https://www.origin.com/download")
async def _steam_command(command, game_id): if is_uri_handler_installed("steam"): await SteamPlugin._open_uri("steam://{}/{}".format( command, game_id)) else: await SteamPlugin._open_uri("https://store.steampowered.com/about/" )
async def install_game(self, game_id: GameId): def is_subscription_game(game_id: GameId) -> bool: return game_id.endswith('subscription') def is_offer_missing_from_user_library(offer_id: OfferId): return offer_id not in self._offer_id_cache async def get_subscription_game_store_uri(offer_id): try: offer = await self._backend_client.get_offer(offer_id) return "https://www.origin.com/store/{}".format( offer["gdpPath"]) except (KeyError, UnknownError, BackendError, UnknownBackendResponse): return "https://www.origin.com/store/ea-play/play-list" offer_id = self._offer_id_from_game_id(game_id) if is_subscription_game( game_id) and is_offer_missing_from_user_library(offer_id): uri = await get_subscription_game_store_uri(offer_id) elif is_uri_handler_installed("origin2"): uri = f"origin2://game/download?offerId={game_id}" else: uri = "https://www.origin.com/download" self._open_uri(uri)
async def launch_game(self, game_id: GameId): if is_uri_handler_installed("origin2"): uri = "origin2://game/launch?offerIds={}&autoDownload=1".format( game_id) else: uri = "https://www.origin.com/download" self._open_uri(uri)
async def launch_game(self, game_id): if is_uri_handler_installed("origin2"): entitlement = self._entitlement_cache.get(game_id) if entitlement and 'externalType' in entitlement: game_id += '@' + entitlement['externalType'].lower() webbrowser.open( "origin2://game/launch?offerIds={}&autoDownload=true".format( game_id)) else: webbrowser.open("https://www.origin.com/download")
async def install_game(self, game_id): if is_uri_handler_installed("origin2"): await OriginPlugin._open_uri( "origin2://game/download?offerId={}".format(game_id)) else: await OriginPlugin._open_uri("https://www.origin.com/download")
async def install_game(self, game_id): if is_uri_handler_installed("origin2"): webbrowser.open( "origin2://game/download?offerId={}".format(game_id)) else: webbrowser.open("https://www.origin.com/download")