summaryrefslogtreecommitdiff
path: root/backend/decky_loader/updater.py
diff options
context:
space:
mode:
authorParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2024-02-15 22:28:36 +0000
committerParty Wumpus <48649272+PartyWumpus@users.noreply.github.com>2024-02-15 22:28:36 +0000
commit867ce63f7bc67cb418d96d226a7e3eaf2b05bc87 (patch)
tree5424e3374c2f66e25d6fa0a80bc4f6f3e18fa84d /backend/decky_loader/updater.py
parentee6122b97d042e8bb50531511d6c0103e0d6a358 (diff)
downloaddecky-loader-867ce63f7bc67cb418d96d226a7e3eaf2b05bc87.tar.gz
decky-loader-867ce63f7bc67cb418d96d226a7e3eaf2b05bc87.zip
Add event handler
Diffstat (limited to 'backend/decky_loader/updater.py')
-rw-r--r--backend/decky_loader/updater.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/decky_loader/updater.py b/backend/decky_loader/updater.py
index eadd49af..5ead49b4 100644
--- a/backend/decky_loader/updater.py
+++ b/backend/decky_loader/updater.py
@@ -189,7 +189,7 @@ class Updater:
raw += len(c)
new_progress = round((raw / total) * 100)
if progress != new_progress:
- self.context.loop.create_task(tab.evaluate_js(f"window.DeckyUpdater.updateProgress({new_progress})", False, False, False))
+ self.context.loop.create_task(self.context.ws.emit("frontend/update_download_percentage", new_progress))
progress = new_progress
if ON_LINUX:
@@ -202,7 +202,7 @@ class Updater:
logger.info(f"Setting the executable flag with chcon returned {await process.wait()}")
logger.info("Updated loader installation.")
- await tab.evaluate_js("window.DeckyUpdater.finish()", False, False)
+ await self.context.ws.emit("frontend/finish_download")
await self.do_restart()
await tab.close_websocket()