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);
|
||||
});
|
||||
|
||||
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) {
|
||||
|
|
|
@ -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"),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue