diff --git a/config.js b/config.js index 75505688..94146509 100644 --- a/config.js +++ b/config.js @@ -11,7 +11,6 @@ module.exports = { AUTO_UPDATE_URL: 'https://webtorrent.io/app/updates?version=' + APP_VERSION, AUTO_UPDATE_CHECK_STARTUP_DELAY: 60 * 1000 /* 1 minute */, - AUTO_UPDATE_CHECK_INTERVAL: 6 * 60 * 60 * 1000 /* 6 hours */, CONFIG_PATH: applicationConfigPath('WebTorrent'), CONFIG_POSTER_PATH: path.join(applicationConfigPath('WebTorrent'), 'Posters'), diff --git a/main/auto-updater.js b/main/auto-updater.js index f161d9b2..37a400b1 100644 --- a/main/auto-updater.js +++ b/main/auto-updater.js @@ -11,31 +11,21 @@ var autoUpdater = electron.autoUpdater function init () { autoUpdater.on('error', function (err) { - log.error('Auto update error', err.message || err) + log.error('App update error: ' + err.message || err) }) autoUpdater.setFeedURL(config.AUTO_UPDATE_URL) - // TODO: remove - autoUpdater.checkForUpdates() - /* * We always check for updates on app startup. To keep app startup fast, we delay this * first check so it happens when there is less going on. */ setTimeout(() => autoUpdater.checkForUpdates(), config.AUTO_UPDATE_CHECK_STARTUP_DELAY) - /* - * After the first check for updates, we continually check for updates on a regular - * interval. This is to ensure that checks happen even when the app is left open for a - * long time. - */ - setInterval(() => autoUpdater.checkForUpdates(), config.AUTO_UPDATE_CHECK_INTERVAL) - autoUpdater.on('checking-for-update', () => log('Checking for app update')) autoUpdater.on('update-available', () => log('App update available')) autoUpdater.on('update-not-available', () => log('App update not available')) - autoUpdater.on('update-downloaded', function (e) { - log('App update downloaded', e) + autoUpdater.on('update-downloaded', function (e, releaseNotes, releaseName, releaseDate, updateURL) { + log('App update downloaded: ', releaseName, updateURL) }) }