[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:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user