Skip to content

Commit

Permalink
emergency commit: force usage of clientsettingscdn zintegration
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Aug 17, 2023
1 parent 76664e5 commit ed2b201
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions roblox.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/url"
"os"
"os/exec"
"encoding/json"

Check failure on line 9 in roblox.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -43,6 +44,14 @@ func (r *Roblox) AppSettings() {
}
}

type ClientVersion struct {
Version string `json:"version"`
ClientVersionUpload string `json:"clientVersionUpload"`
BootstrapperVersion string `json:"bootstrapperVersion"`
NextClientVersionUpload string `json:"nextClientVersionUpload"`
NextClientVersion string `json:"nextClientVersion"`
}

func (r *Roblox) SetupURL(channel string) {
r.BaseURL = RBXCDNURL

Expand All @@ -54,12 +63,18 @@ func (r *Roblox) SetupURL(channel string) {
}

func (r *Roblox) GetVersion(versionFile string) {

Check warning on line 65 in roblox.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unused-parameter: parameter 'versionFile' seems to be unused, consider removing or renaming it as _ (revive)
version, err := util.URLBody(r.BaseURL + versionFile)
var cv ClientVersion

version, err := util.URLBody("https://clientsettings.roblox.com/v2/client-version/WindowsPlayer/channel/zintegration")
if err != nil {
log.Fatal(err)
}

r.Version = version
if err := json.Unmarshal([]byte(version), &cv); err != nil {
log.Fatal(err)
}

r.Version = cv.ClientVersionUpload
}

func (r *Roblox) Install() {
Expand Down

0 comments on commit ed2b201

Please sign in to comment.