mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 09:48:50 +01:00
fix update read json
This commit is contained in:
parent
b55e9282cd
commit
143c168070
@ -282,7 +282,7 @@ class UpdatePage(Page):
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
elif "gitversion" in json_: ### just use git to run update
|
||||
if confirm.VERSION != json_["gitversion"]:
|
||||
if config.VERSION != json_["gitversion"]:
|
||||
self._ConfirmPage._URL = None
|
||||
self._ConfirmPage._MD5 = None
|
||||
self._ConfirmPage._GIT = True
|
||||
@ -292,10 +292,16 @@ class UpdatePage(Page):
|
||||
self._Screen.Draw()
|
||||
self._ConfirmPage.SnapMsg("Update to %s ?" % json_["gitversion"] )
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
else:
|
||||
self._Screen.Draw()
|
||||
self._Screen._MsgBox.SetText("Out of update")
|
||||
self._Screen._MsgBox.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
pygame.time.delay(600)
|
||||
|
||||
return True
|
||||
except:
|
||||
print("r.json error")
|
||||
except Exception, e:
|
||||
print("r.json() error %s" % str(e))
|
||||
|
||||
else:
|
||||
print(" requests get error %d ", r.status_code)
|
||||
|
||||
@ -10,7 +10,7 @@ Battery = "/sys/class/power_supply/axp20x-battery/uevent"
|
||||
|
||||
MPD_socket = "/tmp/mpd.socket"
|
||||
|
||||
UPDATE_URL="http://192.168.31.236:81/version.php"
|
||||
UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/launcher/master/launcher_ver.json"
|
||||
|
||||
|
||||
VERSION="1.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user