mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
fix: take the Agent's empty answer for an uninstalled game as gone
Once Blizzard's Agent has removed a game it answers GET /game/<uid> with an empty object, not installed false, so a finished uninstall read as a failure and opened Battle.net.
This commit is contained in:
1 parent
c48297e0d1
commit
3b6b304f55
2 files changed
+6
-2
No files matched your search
@@ -1227,7 +1227,8 @@ def agent_job(root, action, uid, product="", folder="", locale="enUS", country="
|
||||
leftovers = wine_processes(pfx)
|
||||
if leftovers and idle(leftovers):
|
||||
stop(leftovers)
|
||||
game = read_status(base + ".game") or {}
|
||||
answer = read_status(base + ".game")
|
||||
game = answer or {}
|
||||
status = read_status(base + ".json") or {}
|
||||
try:
|
||||
with open(base + ".error", "rb") as f:
|
||||
@@ -1248,7 +1249,7 @@ def agent_job(root, action, uid, product="", folder="", locale="enUS", country="
|
||||
"version": game.get("local_version", "")}, sort_keys=True))
|
||||
say("%s %s in %s" % (uid, "updated" if action == "update" else "installed", game.get("install_dir", windows)))
|
||||
return 0
|
||||
if reason is None and action == "uninstall" and game.get("installed") is False:
|
||||
if reason is None and action == "uninstall" and (game.get("installed") is False or answer == {}):
|
||||
emit("DONE", json.dumps({"uninstalled": uid}))
|
||||
say("%s uninstalled" % uid)
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user