Merge branch 'main' into enhancement/radio

This commit is contained in:
Core 2022-05-16 15:57:16 +01:00 committed by GitHub
commit eaae9ba457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
103 changed files with 18529 additions and 23706 deletions

View file

@ -78,6 +78,7 @@ export class BrowserWindow {
"pages/audiolabs",
"pages/zoo",
"pages/plugin-renderer",
"pages/keybinds",
"components/mediaitem-artwork",
"components/artwork-material",
"components/menu-panel",
@ -342,6 +343,8 @@ export class BrowserWindow {
});
this.options.width = windowState.width;
this.options.height = windowState.height;
this.options.x = windowState.x;
this.options.y = windowState.y;
switch (process.platform) {
default:
@ -462,6 +465,16 @@ export class BrowserWindow {
}
})
app.get("/cideraudio/impulses/:file", (req, res) => {
const impulseExternals = join(utils.getPath("externals"), "/impulses/")
const impulseFile = join(impulseExternals, req.params.file)
if(existsSync(impulseFile)) {
res.sendFile(impulseFile)
}else{
res.sendFile(join(utils.getPath('srcPath'), "./renderer/audio/impulses/" + req.params.file))
}
})
app.get("/api/playback/:action", (req, res) => {
const action = req.params.action;
switch (action) {
@ -942,13 +955,23 @@ export class BrowserWindow {
switch (path) {
default:
case "plugins":
shell.openPath(utils.getPath("plugins"));
if (existsSync(utils.getPath("plugins"))) {
shell.openPath(utils.getPath("plugins"));
} else {
mkdirSync(utils.getPath("plugins"));
shell.openPath(utils.getPath("plugins"));
}
break;
case "userdata":
shell.openPath(app.getPath("userData"));
break;
case "themes":
shell.openPath(utils.getPath("themes"));
if (existsSync(utils.getPath("themes"))) {
shell.openPath(utils.getPath("themes"));
} else {
mkdirSync(utils.getPath("themes"));
shell.openPath(utils.getPath("themes"));
}
break;
}
});
@ -1060,6 +1083,11 @@ export class BrowserWindow {
BrowserWindow.win.setFullScreen(flag)
})
//Fullscreen
ipcMain.on('getFullScreen', (event, flag) => {
event.returnValue = BrowserWindow.win.isFullScreen()
})
//Fullscreen
ipcMain.on('detachDT', (_event, _) => {
BrowserWindow.win.webContents.openDevTools({mode: 'detach'});