mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
fix: forward Steam maintenance navigation
This commit is contained in:
1 parent
2229dbc0a8
commit
48ad5506b6
7 files changed
+92
-2
No files matched your search
@@ -1050,6 +1050,17 @@ def handle(agent_dir, req):
|
||||
request_timeout(req, 15))
|
||||
if kind == "steam-selection":
|
||||
return steam_selection(agent_dir, request_timeout(req, 5))
|
||||
if kind == "steam-url":
|
||||
url = req.get("url")
|
||||
if not isinstance(url, str) or not re.fullmatch(
|
||||
r"steam://(?:open/downloads|nav/library|uninstall/[1-9][0-9]{0,9})", url):
|
||||
raise AgentError("INVALID_REQUEST", "Steam navigation URL is not supported")
|
||||
try:
|
||||
subprocess.Popen(["steam", url], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, start_new_session=True)
|
||||
except OSError as e:
|
||||
raise AgentError("STEAM_UNAVAILABLE", "%s: %s" % (url, e))
|
||||
return {"launched": True}
|
||||
if kind == "quit":
|
||||
return quit_game(agent_dir, req.get("appId"), request_timeout(req, 15))
|
||||
if kind == "vr":
|
||||
|
||||
Reference in new issue
Block a user