Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Jan 30, 2021
2 parents bb411a3 + 0c63268 commit 51964e5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 39 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,13 @@ Project versioning adheres to [Semantic Versioning](http://semver.org/).
Commit convention is based on [Conventional Commits](http://conventionalcommits.org).
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).

## [1.7.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.7.0...v1.7.1) - 2021-01-30

### 修复

- 修复非透明模式下右侧滚动条无法拖动的问题
- 修复MAC下xm音乐滑块验证问题

## [1.7.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.6.1...v1.7.0) - 2021-01-30

### 新增
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "1.7.0",
"version": "1.7.1",
"description": "一个免费的音乐查找助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
Expand Down
20 changes: 2 additions & 18 deletions publish/changeLog.md
@@ -1,20 +1,4 @@
### 新增

- 搜索界面新增搜索状态的提示
- 新增“稍后播放”功能,可在歌曲列表右键菜单使用
- 新增“记住播放进度”功能的控制,该功能默认不再开启,可到播放设置-记住播放进度开启

### 优化

- 优化播放歌曲换源匹配
- 优化设置界面设置项的展示

### 修复

- 修复快速切换歌曲时, 会出现播放的歌曲和界面展示的歌曲不一致的问题
- 修复了一个由版本更新日志显示导致的潜在远程代码执行攻击漏洞,该漏洞影响v1.6.1及之前的所有版本,请务必更新到最新版本
- 修复xm搜索源验证问题

### 其他

- 更新electron到9.4.2
- 修复非透明模式下右侧滚动条无法拖动的问题
- 修复MAC下xm音乐滑块验证问题
3 changes: 1 addition & 2 deletions publish/utils/updateChangeLog.js
Expand Up @@ -44,8 +44,7 @@ module.exports = async newVerNum => {
desc: version.desc,
})
version.version = newVerNum
version.desc = newChangeLog
// version.desc = newMDChangeLog.replace(/(?:^|(\n))#{1,6} (.+)\n/g, '$1$2').trim()
version.desc = newMDChangeLog.replace(/(?:^|(\n))#{1,6} (.+)\n/g, '$1$2').trim()
pkg.version = newVerNum

console.log(chalk.blue('new version: ') + chalk.green(newVerNum))
Expand Down
2 changes: 1 addition & 1 deletion publish/version.json

Large diffs are not rendered by default.

48 changes: 31 additions & 17 deletions src/main/rendererEvents/xm_verify/xm_verify_win.js
Expand Up @@ -27,12 +27,12 @@ mainHandle(ipcMainWindowNames.handle_xm_verify_open, (event, url) => new Promise
const windowSizeInfo = getWindowSizeInfo(global.appSetting)
win = new BrowserWindow({
parent: global.modules.mainWindow,
width: 460,
height: 370,
width: 1000,
height: 800,
resizable: false,
// transparent: true,
x: mainWindowSizeInfo.x + (windowSizeInfo.width - 460) / 2,
y: mainWindowSizeInfo.y + (windowSizeInfo.height - 320 + 52) / 2,
x: mainWindowSizeInfo.x + (windowSizeInfo.width - 1000) / 2,
y: mainWindowSizeInfo.y + (windowSizeInfo.height - 800 + 52) / 2,
minimizable: false,
maximizable: false,
// movable: false,
Expand All @@ -43,20 +43,34 @@ mainHandle(ipcMainWindowNames.handle_xm_verify_open, (event, url) => new Promise
disableHtmlFullscreenWindowResize: true,
},
})
win.webContents.on('did-finish-load', () => {
if (/punish\?/.test(win.webContents.getURL())) return
let ses = win.webContents.session
ses.cookies.get({ name: 'x5sec' })
.then(async([x5sec]) => {
isActioned = true
await closeWin()
if (!x5sec) return reject(new Error('get x5sec failed'))
resolve(x5sec.value)
}).catch(async err => {
// win.webContents.on('did-finish-load', () => {
// if (/punish\?/.test(win.webContents.getURL())) return
// let ses = win.webContents.session
// ses.cookies.get({ name: 'x5sec' })
// .then(async([x5sec]) => {
// isActioned = true
// await closeWin()
// if (!x5sec) return reject(new Error('get x5sec failed'))
// resolve(x5sec.value)
// }).catch(async err => {
// isActioned = true
// await closeWin()
// reject(err)
// })
// })

win.webContents.session.webRequest.onCompleted({ urls: ['*://www.xiami.com/*'] }, details => {
if (/\/_____tmd_____\/slide\?/.test(details.url)) {
for (const item of details.responseHeaders['set-cookie']) {
if (!/^x5sec=/.test(item)) continue
const x5sec = /x5sec=(\w+);.+$/.exec(item)
isActioned = true
await closeWin()
reject(err)
})
closeWin().finally(() => {
if (!x5sec) return reject(new Error('get x5sec failed'))
resolve(x5sec[1])
})
}
}
})

win.webContents.loadURL(url, {
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/App.vue
Expand Up @@ -462,6 +462,10 @@ body {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#view { // 偏移5px距离解决非透明模式下右侧滚动条无法拖动的问题
margin-right: 5Px;
}
}
#container {
Expand Down

0 comments on commit 51964e5

Please sign in to comment.