Skip to content

Commit

Permalink
change release URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
mantikafasi committed Oct 10, 2023
1 parent 463a661 commit fd7dc30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import "image/color"
var InstallerGitHash = "Unknown"
var InstallerTag = "Unknown"

const ReleaseUrl = "https://api.github.com/repos/Vendicated/Vencord/releases/latest"
const ReleaseUrl = "https://api.github.com/repos/StupidityDB/Bencord/releases/latest"
const ReleaseUrlFallback = "https://vencord.dev/releases/vencord"
const InstallerReleaseUrl = "https://api.github.com/repos/Vencord/Installer/releases/latest"
const InstallerReleaseUrl = "https://api.github.com/repos/StupidityDB/BencordInstaller/releases/latest"
const InstallerReleaseUrlFallback = "https://vencord.dev/releases/installer"

var UserAgent = "VencordInstaller/" + InstallerGitHash + " (https://github.com/Vencord/Installer)"
Expand Down
6 changes: 4 additions & 2 deletions github_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ func GetGithubRelease(url, fallbackUrl string) (*GithubRelease, error) {
// GitHub has a very strict 60 req/h rate limit and some (mostly indian) isps block github for some reason.
// If that is the case, try our fallback at https://vencord.dev/releases/project
if isRateLimitedOrBlocked && !triedFallback {
fmt.Printf("Failed to fetch %s (status code %d). Trying fallback url %s\n", url, res.StatusCode, fallbackUrl)
return GetGithubRelease(fallbackUrl, fallbackUrl)
//disable fallback as I am too lazy to do that
return nil,errors.New(res.Status)
//fmt.Printf("Failed to fetch %s (status code %d). Trying fallback url %s\n", url, res.StatusCode, fallbackUrl)
//return GetGithubRelease(fallbackUrl, fallbackUrl)
}

err = errors.New(res.Status)
Expand Down

0 comments on commit fd7dc30

Please sign in to comment.