Fixed errors when gitea not available

main
Yuriy 11 months ago
parent de310d8f14
commit 181044be9a

@ -42,7 +42,7 @@ global UpdateVersionNumber
ScriptName = Freedomain Social Media Poster
ScriptVersion = 2.84
ScriptVersion = 2.85
FullScriptName := ScriptName . " " . ScriptVersion
;---ToDo---
@ -299,7 +299,7 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
(Locals != "")?(LocalsCheckStatus := 0) : (LocalsCheckStatus := 1)
(LinkedIN != "")?(LinkedINCheckStatus := 0) : (LinkedINCheckStatus := 1)
(Twetch != "")?(TwetchCheckStatus := 0) : (TwetchCheckStatus := 1)
(ThinkSpot != "")?(ThinkSpotCheckStatus := 0) : (ThinkSpotCheckStatus := 1)
(ThinkSpot != "")?(ThinkSpotCheckStatus := 0) : (ThinkSpotCheckStatus := 0)
; (Flote != "")?(FloteCheckStatus := 0) : (FloteCheckStatus := 0)
; (Pintrest != "")?(PintrestCheckStatus := 0) : (PintrestCheckStatus := 1)
; (Parler != "")?(ParlerCheckStatus := 0) : (ParlerCheckStatus := 0)
@ -512,13 +512,22 @@ ControlFocus, Edit1, %FullScriptName%
; check for updates if the setting is enabled
if(AutoUpdateCheck AND !SkipUpdateCheckThisRun){
CheckForUpdates(GitReleasesAPIURL)
if(AutoUpdateCheck AND !UpdateAvailable){
Message = Checking for Updates
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; DevModeMsgBox("checking for updates")
; msgbox, checkin for update
; DevModeMsgBox(GitReleasesAPIURL)
; UpdateAvailable :=
if(CheckForUpdates(GitReleasesAPIURL))
GuiControl,,UpdateAvailable, Uploader Update Available!
; if(CheckForChromeUpdates(ChromeFilepath))
; GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
if(CheckForChromeUpdates(ChromeFilepath)){
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
ChromeUpdateAvailable := 1
}
}
@ -615,7 +624,9 @@ if(!status){
}
DownloadLatestChromium()
Status := DownloadLatestChromium()
if(Status)
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
Return
@ -808,7 +819,7 @@ IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, SocialMediaPoster, ShowT
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
(LinkedIn = 1)?(PostedWebsites .= "LinkedIn|") : ()
(Twetch = 1)?(PostedWebsites .= "Twetch|") : ()
(ThinkSpot = 1)?(PostedWebsites .= "ThinkSpot|") : ()
(ThinkSpot = 0)?(PostedWebsites .= "ThinkSpot|") : ()
; (Flote = 1)?(PostedWebsites .= "Flote|") : ()
(PocketNet = 1)?(PostedWebsites .= "PocketNet|") : ()
(Gettr = 1)?(PostedWebsites .= "Gettr|") : ()

@ -1 +1 @@
Subproject commit 1962743565d49bd0ed3c36a67a05642483e28eff
Subproject commit 49b1e74d40b1c64e9c6e48958d4741ae7e6a5a6d

@ -8,30 +8,13 @@ SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Toolti
IniRead, LocalsURL, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL, %A_Space%
if(LocalsURL = ""){
Message = Please add your Locals Profile URL to the settings.ini file under`n`n[General]`nLocalsURL=
if(LocalsURL = "" OR !InStr(LocalsURL, "/share/post")){
Message = Please add your Locals Profile URL to the settings.ini file under`n`n[General]`nLocalsURL=`n`nURL Needs to end in: /share/post
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Message = LocalsURL from Ini File: %LocalsURL%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
if(!InStr(LocalsURL, "/share/post")){
LocalsURL = https://freedomain.locals.com/share/post
Message = LocalsURL from ini file was incorrect. New URL set to %LocalsURL% and saved to settings.ini
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniWrite, %LocalsURL%, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL
}
; LocalsURL := StrReplace(Localsurl, "/share/post", "")
; LocalsURL := Localsurl . "/login"
; Message = Localsurl: %LocalsURL%
; SaveOrPostProgress(Message:=Message,PostType:=",DiscordErrorLogging")
Status := NavigateFromBaseURLTo(LocalsURL)
if(Status = "Failed")
Return

Loading…
Cancel
Save