Merge branch 'dev'

pull/453/head v1.7.1
lyswhut 2021-01-30 14:33:58 +08:00
commit 51964e51c6
7 changed files with 47 additions and 39 deletions

View File

@ -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
### 新增

View File

@ -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",

View File

@ -1,20 +1,4 @@
### 新增
- 搜索界面新增搜索状态的提示
- 新增“稍后播放”功能,可在歌曲列表右键菜单使用
- 新增“记住播放进度”功能的控制,该功能默认不再开启,可到播放设置-记住播放进度开启
### 优化
- 优化播放歌曲换源匹配
- 优化设置界面设置项的展示
### 修复
- 修复快速切换歌曲时, 会出现播放的歌曲和界面展示的歌曲不一致的问题
- 修复了一个由版本更新日志显示导致的潜在远程代码执行攻击漏洞该漏洞影响v1.6.1及之前的所有版本,请务必更新到最新版本
- 修复xm搜索源验证问题
### 其他
- 更新electron到9.4.2
- 修复非透明模式下右侧滚动条无法拖动的问题
- 修复MAC下xm音乐滑块验证问题

View File

@ -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))

File diff suppressed because one or more lines are too long

View File

@ -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,
@ -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]) => {
// 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()
if (!x5sec) return reject(new Error('get x5sec failed'))
resolve(x5sec.value)
}).catch(async err => {
isActioned = true
await closeWin()
reject(err)
})
closeWin().finally(() => {
if (!x5sec) return reject(new Error('get x5sec failed'))
resolve(x5sec[1])
})
}
}
})
win.webContents.loadURL(url, {

View File

@ -462,6 +462,10 @@ body {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#view { // 5px
margin-right: 5Px;
}
}
#container {