Merge remote-tracking branch 'upstream/upcoming' into upcoming
This commit is contained in:
commit
8ed82cc5e8
8 changed files with 1598 additions and 12 deletions
|
@ -201,6 +201,8 @@ export class Win {
|
|||
*/
|
||||
const remote = express();
|
||||
remote.use(express.static(path.join(this.paths.srcPath, "./web-remote/")))
|
||||
remote.set("views", path.join(this.paths.srcPath, "./web-remote/views"));
|
||||
remote.set("view engine", "ejs");
|
||||
getPort({port: 6942}).then((port) => {
|
||||
this.remotePort = port;
|
||||
remote.listen(this.remotePort, () => {
|
||||
|
@ -218,6 +220,9 @@ export class Win {
|
|||
}
|
||||
firstRequest = false;
|
||||
})
|
||||
remote.get("/", (req, res) => {
|
||||
res.render("index", this.EnvironmentVariables);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ export class wsapi {
|
|||
response.message = "Previous";
|
||||
break;
|
||||
case "musickit-api":
|
||||
this._win.webContents.executeJavaScript(`wsapi.musickitApi(\`${data.method}\`, \`${data.id}\`, ${JSON.stringify(data.params)})`);
|
||||
this._win.webContents.executeJavaScript(`wsapi.musickitApi(\`${data.method}\`, \`${data.id}\`, ${JSON.stringify(data.params)} , ${data.library})`);
|
||||
break;
|
||||
case "musickit-library-api":
|
||||
break;
|
||||
|
@ -218,7 +218,7 @@ export class wsapi {
|
|||
this._win.hide()
|
||||
break;
|
||||
case "play-mediaitem":
|
||||
this._win.webContents.executeJavaScript(`wsapi.playTrackById(${data.id}, \`${data.kind}\`)`);
|
||||
this._win.webContents.executeJavaScript(`wsapi.playTrackById("${data.id}", \`${data.kind}\`)`);
|
||||
response.message = "Playing track";
|
||||
break;
|
||||
case "get-status":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue