From 66cd58823ff7cb5ab090e879b49cb616619e7b9d Mon Sep 17 00:00:00 2001 From: Jakob Stendahl <14180120+JakobST1n@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:13:22 +0200 Subject: :hammer: Attempt to fix updater url --- src/SelfUpdater/index.js | 10 +++++----- 1 file 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."); } -- cgit v1.2.3