added ability for cideraudio to be loaded externally

This commit is contained in:
booploops 2022-04-27 19:19:04 -07:00
parent 6b0a39a6bb
commit 82d403a9ab
4 changed files with 11 additions and 2 deletions

View file

@ -423,6 +423,14 @@ export class BrowserWindow {
res.render("main", this.EnvironmentVariables);
});
app.get("/audio/cideraudio.js", (_req, res) => {
if (existsSync(join(utils.getPath("externals"), "/audio.js"))) {
res.sendFile(join(utils.getPath("externals"), "/audio.js"));
} else {
res.sendFile(join(utils.getPath('srcPath'), "./renderer/audio/audio.js"));
}
})
app.get("/api/playback/:action", (req, res) => {
const action = req.params.action;
switch (action) {

View file

@ -22,6 +22,7 @@ export class utils {
ciderCache: path.resolve(app.getPath("userData"), "CiderCache"),
themes: path.resolve(app.getPath("userData"), "Themes"),
plugins: path.resolve(app.getPath("userData"), "Plugins"),
externals: path.resolve(app.getPath("userData"), "externals"),
};
/**

View file

@ -2,7 +2,7 @@ import { app } from "./vueapp.js"
import {CiderCache} from './cidercache.js'
import {CiderFrontAPI} from './ciderfrontapi.js'
import {simulateGamepad} from './gamepad.js'
import {CiderAudio} from '../audio/audio.js'
import {CiderAudio} from '../audio/cideraudio.js'
import {Events} from './events.js'
import { wsapi } from "./wsapi_interop.js"
import { MusicKitTools } from "./musickittools.js"

View file

@ -907,7 +907,7 @@ const app = new Vue({
}, 500)
ipcRenderer.invoke("renderer-ready", true)
document.querySelector("#LOADER").remove()
if (this.cfg.general.themeUpdateNotification) {
if (this.cfg.general.themeUpdateNotification && !this.isDev) {
this.checkForThemeUpdates()
}
},