[Update/Refactor/bugfix]

Update: Add functions and test ui.
Update, backend: send latest vrct version to frontend.
Refactor: Change the plugins data structure.
bugfix: fix endless showing update button.
This commit is contained in:
Sakamoto Shiina
2025-04-09 17:29:31 +09:00
parent 67f32ad7b9
commit 7e637b795d
18 changed files with 404 additions and 180 deletions

View File

@@ -447,11 +447,11 @@ class Controller:
return {"status":200, "result":config.VERSION}
def checkSoftwareUpdated(self) -> dict:
update_flag = model.checkSoftwareUpdated()
software_update_info = model.checkSoftwareUpdated()
self.run(
200,
self.run_mapping["update_software_flag"],
update_flag,
self.run_mapping["software_update_info"],
software_update_info,
)
@staticmethod

View File

@@ -38,7 +38,7 @@ run_mapping = {
"mic_device_list":"/run/mic_device_list",
"speaker_device_list":"/run/speaker_device_list",
"update_software_flag":"/run/update_software_flag",
"software_update_info":"/run/software_update_info",
"initialization_progress":"/run/initialization_progress",
"initialization_complete":"/run/initialization_complete",

View File

@@ -320,6 +320,7 @@ class Model:
def checkSoftwareUpdated():
# check update
update_flag = False
version = ""
try:
response = requests_get(config.GITHUB_URL)
json_data = response.json()
@@ -331,7 +332,10 @@ class Model:
update_flag = True
except Exception:
errorLogging()
return update_flag
return {
"is_update_available": update_flag,
"new_version": version,
}
@staticmethod
def updateSoftware():