diff options
author | Jakob Stendahl <14180120+JakobST1n@users.noreply.github.com> | 2021-10-14 13:13:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 13:13:22 +0200 |
commit | 66cd58823ff7cb5ab090e879b49cb616619e7b9d (patch) | |
tree | f523e33e45104438466d70e8d1964c7e6c363b5b | |
parent | d12577a79300dee1fe7c8567fa71095e6c8b8a9d (diff) | |
download | Luxcena-Neo-66cd58823ff7cb5ab090e879b49cb616619e7b9d.tar.gz Luxcena-Neo-66cd58823ff7cb5ab090e879b49cb616619e7b9d.zip |
:hammer: Attempt to fix updater url
-rw-r--r-- | src/SelfUpdater/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SelfUpdater/index.js b/src/SelfUpdater/index.js index f332e27..28bb65a 100644 --- a/src/SelfUpdater/index.js +++ b/src/SelfUpdater/index.js @@ -16,10 +16,11 @@ class VersionChecker { this.checkFrequency = neoModules.userData.config.SelfUpdater.checkVersionInterval * 86400000; // Takes in days. this.repoBranch = neoModules.userData.config.SelfUpdater.branch; - this.remotePackageJSON = "https://raw.githubusercontent.com" + url.parse(this.repoLink).pathname + "/" + this.repoBranch + "/package.json"; + this.remotePackageJSON = "https://raw.githubusercontent.com/JakobST1n/Luxcena-Neo/" + this.repoBranch + "/package.json"; this.newVersion = false; - this.newestVersion = this.checkVersion(this.remotePackageJSON); + this.newestVersion = this.version; + this.checkVersion(this.remotePackageJSON); this.updateChecker = setInterval(() => { let newVersion = this.checkVersion(this.remotePackageJSON); @@ -31,15 +32,14 @@ class VersionChecker { request.get(this.remotePackageJSON, (error, response, body) => { if (!error && response.statusCode === 200) { let remotePackageJSON = JSON.parse(body); - let newestVersion = remotePackageJSON["version"]; - if (newestVersion != this.version) { + this.newestVersion = remotePackageJSON["version"]; + if (this.newestVersion != this.version) { logger.notice("A new version is available on \"" + this.repoBranch + "\" (v" + this.version + ")"); this.newVersion = true; } else { logger.info(`Running newest version (${newestVersion})`); this.newVersion = false; } - this.newestVersion = newestVersion; } else { logger.notice("Could not find latest version! Please check you internet connection."); } |