Fixed Auto Update Check/Install from Gitea functionality
This commit is contained in:
@@ -29,7 +29,7 @@ global ScriptVersion
|
|||||||
global FullScriptName
|
global FullScriptName
|
||||||
|
|
||||||
ScriptName = Freedomain Video Uploader
|
ScriptName = Freedomain Video Uploader
|
||||||
ScriptVersion = 3.0
|
ScriptVersion = 3.1
|
||||||
FullScriptName := ScriptName . " - " . ScriptVersion
|
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||||
|
|
||||||
|
|
||||||
@@ -553,6 +553,22 @@ else, {
|
|||||||
SecondaryButtonHeights := 35
|
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-------------------------------
|
||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
@@ -784,16 +800,6 @@ if(SkipToDBInfo){
|
|||||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;---Check for Update---
|
|
||||||
;------------------------------------------------
|
|
||||||
|
|
||||||
if(AutoUpdateCheck AND !UpdateAvailable And !SkipUpdateCheckThisRun){
|
|
||||||
; msgbox, checkin for update
|
|
||||||
; DevModeMsgBox(GitReleasesAPIURL)
|
|
||||||
CheckForUpdates(GitReleasesAPIURL)
|
|
||||||
}
|
|
||||||
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
; -------------------------------GUI GoSubs-------------------------------
|
; -------------------------------GUI GoSubs-------------------------------
|
||||||
|
|||||||
@@ -37,21 +37,22 @@ CheckForUpdates(GitReleasesAPIURL){
|
|||||||
|
|
||||||
UpdateVersionNumber := parsed.1.name
|
UpdateVersionNumber := parsed.1.name
|
||||||
|
|
||||||
; DevModeMsgBox(UpdateVersionNumber)
|
Message = UpdateVersionNumber: %UpdateVersionNumber%
|
||||||
|
DevModeMsgBox(Message)
|
||||||
|
|
||||||
|
|
||||||
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
|
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
|
||||||
ToolTip
|
ToolTip
|
||||||
return
|
return 0
|
||||||
}
|
}
|
||||||
else, {
|
else, {
|
||||||
UpdateAvailable := 1
|
UpdateAvailable := 1
|
||||||
; msgbox, update found!
|
; msgbox, update found!
|
||||||
Message = Program Update Found
|
Message = Program Update Found
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
||||||
; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable
|
; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable
|
||||||
; ToolTip
|
; ToolTip
|
||||||
return
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -153,11 +154,11 @@ TakeScreenshotOfPage(SaveFilepath := ""){
|
|||||||
; sleep, 5000
|
; sleep, 5000
|
||||||
|
|
||||||
if(SaveFilepath = ""){
|
if(SaveFilepath = ""){
|
||||||
SaveFilepath := ErrorLoggingDirectory
|
SaveFilepath := ErrorLoggingDirectory
|
||||||
}
|
}
|
||||||
|
|
||||||
; if(!FileExist(SaveFilepath))
|
; if(!FileExist(SaveFilepath))
|
||||||
FileCreateDir, %SaveFilepath%
|
FileCreateDir, %SaveFilepath%
|
||||||
|
|
||||||
/* if(!TakeScreenshotsOfErrors)
|
/* if(!TakeScreenshotsOfErrors)
|
||||||
Return
|
Return
|
||||||
@@ -969,14 +970,14 @@ ActivateChromeTab(URL){
|
|||||||
|
|
||||||
; NumberOfTabLoops := Driver.Windows.Count + 2
|
; NumberOfTabLoops := Driver.Windows.Count + 2
|
||||||
loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab
|
loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab
|
||||||
try driver.SwitchToNextWindow()
|
try driver.SwitchToNextWindow()
|
||||||
|
|
||||||
; sleep, 1000
|
; sleep, 1000
|
||||||
; msgbox, looping through tabs
|
; msgbox, looping through tabs
|
||||||
try CurrentTabTitle := driver.window.title
|
try CurrentTabTitle := driver.window.title
|
||||||
try CurrentTabURL := driver.Url
|
try CurrentTabURL := driver.Url
|
||||||
|
|
||||||
if(InStr(CurrentTabURL, URLBase)){
|
if(InStr(CurrentTabURL, URLBase)){
|
||||||
|
|
||||||
Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase%
|
Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase%
|
||||||
DevModeMsgBox(message)
|
DevModeMsgBox(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user