added ability for cideraudio to be loaded externally
This commit is contained in:
parent
6b0a39a6bb
commit
82d403a9ab
4 changed files with 11 additions and 2 deletions
|
@ -423,6 +423,14 @@ export class BrowserWindow {
|
||||||
res.render("main", this.EnvironmentVariables);
|
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) => {
|
app.get("/api/playback/:action", (req, res) => {
|
||||||
const action = req.params.action;
|
const action = req.params.action;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
|
@ -22,6 +22,7 @@ export class utils {
|
||||||
ciderCache: path.resolve(app.getPath("userData"), "CiderCache"),
|
ciderCache: path.resolve(app.getPath("userData"), "CiderCache"),
|
||||||
themes: path.resolve(app.getPath("userData"), "Themes"),
|
themes: path.resolve(app.getPath("userData"), "Themes"),
|
||||||
plugins: path.resolve(app.getPath("userData"), "Plugins"),
|
plugins: path.resolve(app.getPath("userData"), "Plugins"),
|
||||||
|
externals: path.resolve(app.getPath("userData"), "externals"),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { app } from "./vueapp.js"
|
||||||
import {CiderCache} from './cidercache.js'
|
import {CiderCache} from './cidercache.js'
|
||||||
import {CiderFrontAPI} from './ciderfrontapi.js'
|
import {CiderFrontAPI} from './ciderfrontapi.js'
|
||||||
import {simulateGamepad} from './gamepad.js'
|
import {simulateGamepad} from './gamepad.js'
|
||||||
import {CiderAudio} from '../audio/audio.js'
|
import {CiderAudio} from '../audio/cideraudio.js'
|
||||||
import {Events} from './events.js'
|
import {Events} from './events.js'
|
||||||
import { wsapi } from "./wsapi_interop.js"
|
import { wsapi } from "./wsapi_interop.js"
|
||||||
import { MusicKitTools } from "./musickittools.js"
|
import { MusicKitTools } from "./musickittools.js"
|
||||||
|
|
|
@ -907,7 +907,7 @@ const app = new Vue({
|
||||||
}, 500)
|
}, 500)
|
||||||
ipcRenderer.invoke("renderer-ready", true)
|
ipcRenderer.invoke("renderer-ready", true)
|
||||||
document.querySelector("#LOADER").remove()
|
document.querySelector("#LOADER").remove()
|
||||||
if (this.cfg.general.themeUpdateNotification) {
|
if (this.cfg.general.themeUpdateNotification && !this.isDev) {
|
||||||
this.checkForThemeUpdates()
|
this.checkForThemeUpdates()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue