Fixed Auto Update Check/Install from Gitea functionality
This commit is contained in:
@@ -29,7 +29,7 @@ global ScriptVersion
|
||||
global FullScriptName
|
||||
|
||||
ScriptName = Freedomain Video Uploader
|
||||
ScriptVersion = 3.0
|
||||
ScriptVersion = 3.1
|
||||
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||
|
||||
|
||||
@@ -553,6 +553,22 @@ else, {
|
||||
SecondaryButtonHeights := 35
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
;---Check for Update---
|
||||
;------------------------------------------------
|
||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
; DevModeMsgBox("checking for updates")
|
||||
; msgbox, checkin for update
|
||||
; DevModeMsgBox(GitReleasesAPIURL)
|
||||
UpdateAvailable := CheckForUpdates(GitReleasesAPIURL)
|
||||
}
|
||||
|
||||
; DevModeMsgBox(AutoUpdateCheck)
|
||||
; DevModeMsgBox(UpdateAvailable)
|
||||
|
||||
|
||||
; -------------------------------GUI-------------------------------
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
@@ -784,16 +800,6 @@ if(SkipToDBInfo){
|
||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||
|
||||
|
||||
|
||||
;---Check for Update---
|
||||
;------------------------------------------------
|
||||
|
||||
if(AutoUpdateCheck AND !UpdateAvailable And !SkipUpdateCheckThisRun){
|
||||
; msgbox, checkin for update
|
||||
; DevModeMsgBox(GitReleasesAPIURL)
|
||||
CheckForUpdates(GitReleasesAPIURL)
|
||||
}
|
||||
|
||||
Return
|
||||
|
||||
; -------------------------------GUI GoSubs-------------------------------
|
||||
|
||||
@@ -37,12 +37,13 @@ CheckForUpdates(GitReleasesAPIURL){
|
||||
|
||||
UpdateVersionNumber := parsed.1.name
|
||||
|
||||
; DevModeMsgBox(UpdateVersionNumber)
|
||||
Message = UpdateVersionNumber: %UpdateVersionNumber%
|
||||
DevModeMsgBox(Message)
|
||||
|
||||
|
||||
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
|
||||
ToolTip
|
||||
return
|
||||
return 0
|
||||
}
|
||||
else, {
|
||||
UpdateAvailable := 1
|
||||
@@ -51,7 +52,7 @@ CheckForUpdates(GitReleasesAPIURL){
|
||||
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
||||
; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable
|
||||
; ToolTip
|
||||
return
|
||||
return 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user