mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
auto updater
This commit is contained in:
parent
6e9213a978
commit
9092f27c15
3
dev-app-update.yml
Normal file
3
dev-app-update.yml
Normal file
@ -0,0 +1,3 @@
|
||||
provider: github
|
||||
repo: mStream
|
||||
owner: IrosTheBeggar
|
||||
@ -4,7 +4,7 @@ const fe = require('path');
|
||||
const os = require('os');
|
||||
const mkdirp = require('make-dir');
|
||||
const AutoLaunch = require('auto-launch');
|
||||
const {autoUpdater} = require("electron-updater");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
|
||||
const mstreamAutoLaunch = new AutoLaunch({ name: 'mStream' });
|
||||
const configFile = fe.join(app.getPath('userData'), 'save/server-config.json');
|
||||
@ -114,8 +114,6 @@ function createMainWindow() {
|
||||
// Dereference the window object, usually you would store windows
|
||||
mainWindow = null;
|
||||
});
|
||||
|
||||
autoUpdater.checkForUpdates();
|
||||
}
|
||||
|
||||
// Boot Server Event
|
||||
@ -206,6 +204,15 @@ function bootServer(program) {
|
||||
server.serveIt(program);
|
||||
|
||||
setInterval(() => { autoUpdater.checkForUpdates(); }, 86400000);
|
||||
checkForUpdates();
|
||||
}
|
||||
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
await autoUpdater.checkForUpdates();
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle Auto Updates
|
||||
|
||||
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mstream",
|
||||
"version": "4.4.4",
|
||||
"version": "4.4.5",
|
||||
"description": "music streaming server",
|
||||
"main": "cli-boot-wrapper.js",
|
||||
"bin": {
|
||||
@ -64,6 +64,11 @@
|
||||
"frp/mstream-ddns-linux",
|
||||
"sync/syncthing-linux"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"provider": "github",
|
||||
"repo": "mStream",
|
||||
"owner": "IrosTheBeggar"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
@ -73,15 +78,11 @@
|
||||
"axios": "^0.19.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"busboy": "^0.3.1",
|
||||
"colors": "^1.4.0",
|
||||
"commander": "^3.0.2",
|
||||
"electron-updater": "^4.1.2",
|
||||
"express": "^4.17.1",
|
||||
"fast-xml-parser": "^3.13.0",
|
||||
"ffbinaries": "^1.1.4",
|
||||
"fluent-ffmpeg": "^2.1.2",
|
||||
"inquirer": "^7.0.0",
|
||||
"inquirer-select-directory": "^1.2.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lokijs": "^1.5.7",
|
||||
"make-dir": "^3.0.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user