increased auto update delay, ntfy integration, additionally, testing whether or not the updates work before installing it on existing keypads.
This commit is contained in:
		
							parent
							
								
									d6f168e9eb
								
							
						
					
					
						commit
						2bec12c8df
					
				| 
						 | 
				
			
			@ -7,7 +7,7 @@ local require = function(path)
 | 
			
		|||
        return __DEFAULT_IMPORT(path)
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
local KEYPADOS_UPDATE_HASH = "dGWGjxrYViZwxsSgLMdmnMeu"
 | 
			
		||||
local KEYPADOS_UPDATE_HASH = "AwORcRpboefqGZBiZMSjEBeG"
 | 
			
		||||
rawset(__BUNDLER_FILES, "updater.lua", function ()
 | 
			
		||||
    local utils = require("utils.lua")
 | 
			
		||||
    local LAST_USED = os.time()
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ rawset(__BUNDLER_FILES, "updater.lua", function ()
 | 
			
		|||
        print("Checking for update... difference: " .. tostring(difference))
 | 
			
		||||
        --its been considerable time since the keypad was interacted with
 | 
			
		||||
        --therefore it's time to force an update down the users throat (microsoft moment)
 | 
			
		||||
        if difference > .5 then
 | 
			
		||||
        if difference > 10 then
 | 
			
		||||
            local update_code_request = http.get("https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/keypadOS.lua?x=" .. tostring(math.random(11111111, 99999999))) -- I HATE CACHE REEEEEEEEEEEEEEEEE
 | 
			
		||||
            if update_code_request then
 | 
			
		||||
                local update_code_text = update_code_request.readAll()
 | 
			
		||||
| 
						 | 
				
			
			@ -193,7 +193,8 @@ rawset(__BUNDLER_FILES, "ui.lua", function ()
 | 
			
		|||
        end)
 | 
			
		||||
        if not status and err ~= "Terminated" then
 | 
			
		||||
            print("Error detected: " .. err)
 | 
			
		||||
            sleep(10)
 | 
			
		||||
            http.post("https://ntfy.sh/keypadOS_alerts", err, {Priority = "urgent"}) --exposed ntfy url no spam me pls
 | 
			
		||||
            sleep(5)
 | 
			
		||||
            utils.MonReset(0.5)
 | 
			
		||||
            fs.delete("basalt.lua")
 | 
			
		||||
            fs.delete("startup.lua")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,7 +122,8 @@ function mod.InitUi()
 | 
			
		|||
 | 
			
		||||
    if not status and err ~= "Terminated" then
 | 
			
		||||
        print("Error detected: " .. err)
 | 
			
		||||
        sleep(10)
 | 
			
		||||
        http.post("https://ntfy.sh/keypadOS_alerts", err, {Priority = "urgent"}) --exposed ntfy url no spam me pls
 | 
			
		||||
        sleep(5)
 | 
			
		||||
        utils.MonReset(0.5)
 | 
			
		||||
        fs.delete("basalt.lua")
 | 
			
		||||
        fs.delete("startup.lua")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ local function checkForUpdate()
 | 
			
		|||
    print("Checking for update... difference: " .. tostring(difference))
 | 
			
		||||
    --its been considerable time since the keypad was interacted with
 | 
			
		||||
    --therefore it's time to force an update down the users throat (microsoft moment)
 | 
			
		||||
    if difference > .5 then
 | 
			
		||||
    if difference > 10 then
 | 
			
		||||
        local update_code_request = http.get("https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/keypadOS.lua?x=" .. tostring(math.random(11111111, 99999999))) -- I HATE CACHE REEEEEEEEEEEEEEEEE
 | 
			
		||||
        if update_code_request then
 | 
			
		||||
            local update_code_text = update_code_request.readAll()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user