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 28, 2022
2 parents 0580b05 + 47ce71c commit e3dddb9
Show file tree
Hide file tree
Showing 11 changed files with 276 additions and 310 deletions.
7 changes: 5 additions & 2 deletions .ncurc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = {
upgrade: true,
// target: 'newest',
reject: [
'electron',
'electron-builder',
'chalk',
]
],
// target: 'newest',
// filter: [
// /^vue/,
// ],
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ 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.17.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.17.0...v1.17.1) - 2022-01-28

### 优化

- 优化kw源英文与翻译歌词的匹配

### 修复

- 修复快捷键与默认按键行为冲突的问题,现在若将某些有默认行为的按键(如在列表中上、下箭头、Home、End等键可以使列表滚动)设置为快捷键时,将禁用其默认行为
- 修复列表的聚焦问题,现在在列表中使用上、下箭头、空格等键滚动列表时不会导致滚动到一定距离后丢失焦点的问题

### 其他

- 更新electron到v13.6.8

## [1.17.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.16.0...v1.17.0) - 2022-01-22

### 新增
Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看上面的
## Scheme URL支持

从v1.17.0起支持 Scheme URL,可以使用此功能从浏览器等场景下调用LX Music,我们开发了一个[油猴脚本](https://github.com/lyswhut/lx-music-script#readme)配套使用<br>
脚本安装地址:<https://greasyfork.org/zh-CN/scripts/438148-lx-msuic-%E8%BE%85%E5%8A%A9%E8%84%9A%E6%9C%AC><br>
脚本安装地址:<https://greasyfork.org/zh-CN/scripts/438148><br>
以下是目前可用的Scheme URL调用方式:

- URL统一以`lxmusic://`开头
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#### Scheme URL支持

从v1.17.0起支持 Scheme URL,可以使用此功能从浏览器等场景下调用LX Music,我们开发了一个[油猴脚本](https://github.com/lyswhut/lx-music-script#readme)配套使用,<br>
脚本安装地址:<https://greasyfork.org/zh-CN/scripts/438148-lx-msuic-%E8%BE%85%E5%8A%A9%E8%84%9A%E6%9C%AC><br>
脚本安装地址:<https://greasyfork.org/zh-CN/scripts/438148><br>

#### 启动参数

Expand Down
483 changes: 219 additions & 264 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "1.17.0",
"version": "1.17.1",
"description": "一个免费的音乐查找助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
Expand Down Expand Up @@ -70,7 +70,7 @@
"up": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://localhost:1081 npm i"
},
"browserslist": [
"Electron 13.6.7"
"Electron 13.6.8"
],
"engines": {
"node": ">= 14"
Expand Down Expand Up @@ -173,7 +173,7 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.16.10",
"@babel/core": "^7.16.12",
"@babel/eslint-parser": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
Expand All @@ -193,11 +193,11 @@
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"del": "^6.0.0",
"electron": "^13.6.7",
"electron": "^13.6.8",
"electron-builder": "^22.11.7",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.4.51",
"electron-to-chromium": "^1.4.56",
"eslint": "^8.7.0",
"eslint-config-standard": "^16.0.3",
"eslint-formatter-friendly": "^7.0.0",
Expand All @@ -206,14 +206,14 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.3.0",
"eslint-plugin-vue": "^8.4.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"markdown-it": "^12.3.2",
"mini-css-extract-plugin": "^2.5.2",
"mini-css-extract-plugin": "^2.5.3",
"node-loader": "^2.0.0",
"postcss": "^8.4.5",
"postcss-loader": "^6.2.1",
Expand All @@ -232,7 +232,7 @@
"vue-loader": "^17.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.67.0",
"webpack-cli": "^4.9.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.3",
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#329c4375134b89d39da23a56a94db651247c74a1",
"webpack-merge": "^5.8.0"
Expand All @@ -256,8 +256,8 @@
"socket.io": "^4.4.1",
"sortablejs": "^1.14.0",
"utf-8-validate": "^5.0.8",
"vue": "^3.2.26",
"vue-i18n": "^9.2.0-beta.26",
"vue": "^3.2.29",
"vue-i18n": "^9.2.0-beta.29",
"vue-router": "^4.0.12",
"vuex": "^4.0.2"
}
Expand Down
19 changes: 4 additions & 15 deletions publish/changeLog.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
### 新增

- 新增“便携”功能,在Windows平台下,若程序目录下存在 portable 目录,则自动使用此目录作为数据存储目录
- 新增 Scheme URL 支持,同时发布lx-music-script项目配合使用(一个油猴脚本,可以在浏览器中的官方平台网页直接调用LX Music),Scheme URL的调用说明看Readme.md文档的Scheme URL支持部分
- 新增启动参数`-proxy-server``-proxy-bypass-list`,详细介绍看Readme.md文档的启动参数部分
- 新增桌面歌词是否延迟滚动设置,默认开启,若你不想要桌面歌词延迟滚动可以去设置-桌面歌词设置关掉

### 优化

- 为可视化音频的频谱整体添加频谱均值加成,使频谱显示更有节奏感
- 优化程序初始化逻辑,修复无网络的情况下的初始化问题
- 我的列表-列表名的右击菜单更新已收藏的在线列表时,将始终重新加载,不再使用缓存,解决在原平台更新歌单后,在LX点击更新可能看到的还是在原平台更新前的歌单的问题
- 优化kw源英文与翻译歌词的匹配

### 修复

- 修复代理不生效的问题
- 修复`openDevTools`选项无效的问题
- 修复播放状态的提示问题
- 修复tx源无搜索结果的问题
- 修复快捷键与默认按键行为冲突的问题,现在若将某些有默认行为的按键(如在列表中上、下箭头、Home、End等键可以使列表滚动)设置为快捷键时,将禁用其默认行为
- 修复列表的聚焦问题,现在在列表中使用上、下箭头、空格等键滚动列表时不会导致滚动到一定距离后丢失焦点的问题

### 其他

- 更新 Electron 到 v13.6.7
- 更新electron到v13.6.8
2 changes: 1 addition & 1 deletion publish/version.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/renderer/components/base/VirtualizedList.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<component :is="containerEl" :class="containerClass" ref="dom_scrollContainer" style="height: 100%; overflow: auto; position: relative; display: block; contain: strict;">
<component :is="containerEl" :class="containerClass" tabindex="0" ref="dom_scrollContainer" style="outline: none; height: 100%; overflow: auto; position: relative; display: block; contain: strict;">
<component :is="contentEl" :class="contentClass" :style="contentStyle">
<div v-for="item in views" :key="item.key" :style="item.style">
<slot name="default" v-bind="{ item: item.item, index: item.index }" />
Expand Down
1 change: 1 addition & 0 deletions src/renderer/event/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ eventHub.on(baseName.bindKey, () => {
eventHub.emit(baseName.key_down, { event, keys, key, type })
// console.log(event, key)
if (!window.isEditingHotKey && appHotKeyConfig.local.enable && appHotKeyConfig.local.keys[key]) {
event.preventDefault()
if (type == 'up') return

// 软件内快捷键的最小化触发时
Expand Down
33 changes: 18 additions & 15 deletions src/renderer/utils/music/kw/lyric.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,20 @@ export default {

for (const item of arr) {
if (lrcSet.has(item.time)) {
const tItem = lrc.pop()
tItem.time = lrc[lrc.length - 1].time
lrcT.push(tItem)
lrc.push(item)
} else {
lrcT.push(item)
lrc.push(item)
lrcSet.add(item.time)
}
}
if (lrc.length) {
if ((lrcT.length - lrc.length) > (lrcT.length * 0.1)) { // 翻译比正文多则证明翻译可能有问题,直接将其丢弃
lrc = lrcT
lrcT = []
} else {
lrc.unshift(lrcT.shift())
}
} else {
lrc = lrcT
lrcT = []

if (lrcT.length && lrc.length > lrcT.length) {
const tItem = lrc.pop()
tItem.time = lrc[lrc.length - 1].time
lrcT.push(tItem)
}

return {
Expand All @@ -45,16 +43,21 @@ export default {
requestObj.promise = requestObj.promise.then(({ body }) => {
// console.log(body)
if (!body.data?.lrclist?.length) return Promise.reject(new Error('Get lyric failed'))
const { lrc, lrcT } = this.sortLrcArr(body.data.lrclist)
let lrcInfo
try {
lrcInfo = this.sortLrcArr(body.data.lrclist)
} catch {
return Promise.reject(new Error('Get lyric failed'))
}
// console.log(body.data.lrclist)
// console.log(lrc, lrcT)
// console.log(lrcInfo.lrc, lrcInfo.lrcT)
// console.log({
// lyric: decodeName(this.transformLrc(body.data.songinfo, lrc)),
// tlyric: decodeName(this.transformLrc(body.data.songinfo, lrcT)),
// })
return {
lyric: decodeName(this.transformLrc(body.data.songinfo, lrc)),
tlyric: lrcT.length ? decodeName(this.transformLrc(body.data.songinfo, lrcT)) : '',
lyric: decodeName(this.transformLrc(body.data.songinfo, lrcInfo.lrc)),
tlyric: lrcInfo.lrcT.length ? decodeName(this.transformLrc(body.data.songinfo, lrcInfo.lrcT)) : '',
}
})
return requestObj
Expand Down

0 comments on commit e3dddb9

Please sign in to comment.