Skip to content

Commit

Permalink
revert: change port to workaround 21H2's port
Browse files Browse the repository at this point in the history
  • Loading branch information
qier222 committed Jan 30, 2023
1 parent 2a0af8f commit ce738f6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VUE_APP_NETEASE_API_URL=/api
VUE_APP_ELECTRON_API_URL=/api
VUE_APP_ELECTRON_API_URL_DEV=http://127.0.0.1:35216
VUE_APP_ELECTRON_API_URL_DEV=http://127.0.0.1:10754
VUE_APP_LASTFM_API_KEY=09c55292403d961aa517ff7f5e8a3d9c
VUE_APP_LASTFM_API_SHARED_SECRET=307c9fda32b3904e53654baff215cb67
DEV_SERVER_PORT=20201
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
uses: samuelmeuli/[email protected]
env:
VUE_APP_ELECTRON_API_URL: /api
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:35216
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754
VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c
VUE_APP_LASTFM_API_SHARED_SECRET: 307c9fda32b3904e53654baff215cb67
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yesplaymusic",
"version": "0.4.6",
"version": "0.4.7",
"private": true,
"description": "A third party music player for Netease Music",
"author": "qier222<[email protected]>",
Expand Down
10 changes: 5 additions & 5 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const closeOnLinux = (e, win, store) => {
win.hide(); //调用 最小化实例方法
} else if (result.response === 1) {
win = null;
app.exit(); // exit()直接关闭客户端,不会执行quit();
app.exit(); //exit()直接关闭客户端,不会执行quit();
}
})
.catch(err => {
Expand Down Expand Up @@ -153,7 +153,7 @@ class Background {

const expressApp = express();
expressApp.use('/', express.static(__dirname + '/'));
expressApp.use('/api', expressProxy('http://127.0.0.1:35216'));
expressApp.use('/api', expressProxy('http://127.0.0.1:10754'));
expressApp.use('/player', (req, res) => {
this.window.webContents
.executeJavaScript('window.yesplaymusic.player')
Expand All @@ -166,7 +166,7 @@ class Background {
});
});
});
this.expressApp = expressApp.listen(41342, '127.0.0.1');
this.expressApp = expressApp.listen(27232, '127.0.0.1');
}

createWindow() {
Expand Down Expand Up @@ -257,8 +257,8 @@ class Background {
createProtocol('app');
this.window.loadURL(
showLibraryDefault
? 'http://localhost:41342/#/library'
: 'http://localhost:41342'
? 'http://localhost:27232/#/library'
: 'http://localhost:27232'
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/electron/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function startNeteaseMusicApi() {

// Load the NCM API.
await server.serveNcmApi({
port: 35216,
port: 10754,
moduleDefs: require('../ncmModDef'),
});
}

0 comments on commit ce738f6

Please sign in to comment.