Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Oct 2, 2021
2 parents a4d3c06 + 6b71b47 commit b726ee4
Show file tree
Hide file tree
Showing 48 changed files with 1,546 additions and 678 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,24 @@ 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.14.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.13.0...v1.14.0) - 2021-10-02

### 新增

- 新增歌词简体中文转繁体中文,当软件语言被设置为繁体中文后,播放歌曲的歌词也将自动转成繁体中文显示
- 新增单个列表导入/导出功能,可以方便分享歌曲列表,可在右击“我的列表”里的列表名后弹出的菜单中使用
- 新增删除列表前的确认弹窗,防止误删列表
- 新增歌词文本选择复制功能,可在详情页进度条上方的歌词文本选择按钮进入歌词文本选择模式,选择完成后可鼠标右击或者使用系统快捷键复制
- 新增重复歌曲列表,可以方便移除我的列表中的重复歌曲,此列表会列出目标列表里歌曲名相同的歌曲,可在右击“我的列表”里的列表名后弹出的菜单中使用

### 修复

- 修复mg排行榜无法加载的问题
- 修复点击播放详情页的进度条跳进度时会出现偏移的问题
- 修复在有提示信息的地方长按鼠标按键时提示信息会闪烁的问题
- 修复下载歌曲时的歌词下载不尝试获取缓存歌词的问题
- 修复GNOME等桌面下每次打开应用时需重新设置歌词窗口置顶的问题

## [1.13.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.12.2...v1.13.0) - 2021-09-05

如果你喜欢并经常使用洛雪音乐,并想要第一时间尝鲜洛雪的新功能,可以加入测试企鹅群768786588,
Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Expand Up @@ -58,7 +58,7 @@

## 无法打开外部歌单

不支持垮源打开歌单,请**确认**你需要打开的歌单平台是否与软件标签所写的**歌单源**对应(不一样的话请通过右上角切换歌单源);<br>
不支持跨源打开歌单,请**确认**你需要打开的歌单平台是否与软件标签所写的**歌单源**对应(不一样的话请通过右上角切换歌单源);<br>
对于分享出来的歌单,若打开失败,可尝试先在浏览器中打开后,再从浏览器地址栏复制URL地址到软件打开;<br>
或者如果你知道歌单 id 也可以直接输入歌单 id 打开。<br>

Expand Down
728 changes: 388 additions & 340 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "1.13.0",
"version": "1.14.0",
"description": "一个免费的音乐查找助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
Expand Down Expand Up @@ -172,30 +172,30 @@
"@babel/plugin-transform-modules-umd": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.15.4",
"@babel/preset-env": "^7.15.6",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"babel-preset-minify": "^0.5.1",
"browserslist": "^4.16.8",
"cfonts": "^2.9.3",
"browserslist": "^4.17.2",
"cfonts": "^2.10.0",
"chalk": "^4.1.2",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^9.0.1",
"core-js": "^3.17.2",
"core-js": "^3.18.1",
"cross-env": "^7.0.3",
"css-loader": "^6.2.0",
"css-loader": "^6.3.0",
"css-minimizer-webpack-plugin": "^3.0.2",
"del": "^6.0.0",
"electron": "^13.3.0",
"electron": "^13.4.0",
"electron-builder": "^22.11.7",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.3.830",
"electron-to-chromium": "^1.3.856",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-formatter-friendly": "^7.0.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
Expand All @@ -207,9 +207,9 @@
"less-loader": "^10.0.1",
"less-plugin-clean-css": "^1.5.1",
"markdown-it": "^12.2.0",
"mini-css-extract-plugin": "^2.2.2",
"mini-css-extract-plugin": "^2.3.0",
"node-loader": "^2.0.0",
"postcss": "^8.3.6",
"postcss": "^8.3.8",
"postcss-loader": "^6.1.1",
"postcss-pxtorem": "^6.0.0",
"pug": "^3.0.2",
Expand All @@ -218,36 +218,36 @@
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"spinnies": "^0.5.1",
"terser-webpack-plugin": "^5.2.3",
"terser-webpack-plugin": "^5.2.4",
"url-loader": "^4.1.1",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.52.0",
"webpack": "^5.56.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^3.11.2",
"webpack-hot-middleware": "^2.25.0",
"webpack-hot-middleware": "^2.25.1",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"bufferutil": "^4.0.3",
"bufferutil": "^4.0.4",
"crypto-js": "^4.1.1",
"electron-log": "^4.4.1",
"electron-store": "^8.0.0",
"electron-store": "^8.0.1",
"electron-updater": "^4.3.9",
"font-list": "git+https://github.com/lyswhut/node-font-list.git#c6caf4060e471afe143a4aca30d554644522966d",
"http-terminator": "^3.0.0",
"http-terminator": "^3.0.3",
"iconv-lite": "^0.6.3",
"image-size": "^1.0.0",
"koa": "^2.13.1",
"koa": "^2.13.3",
"long": "^4.0.0",
"lrc-file-parser": "^1.1.2",
"lrc-file-parser": "^1.2.1",
"needle": "^3.0.0",
"node-id3": "^0.2.3",
"request": "^2.88.2",
"socket.io": "^4.2.0",
"utf-8-validate": "^5.0.5",
"utf-8-validate": "^5.0.6",
"vue": "^2.6.14",
"vue-i18n": "^8.25.0",
"vue-i18n": "^8.26.5",
"vue-router": "^3.5.2",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Expand Up @@ -15,7 +15,7 @@ module.exports = {
'*-height', '*-width',
'flex', '::-webkit-scrollbar',
'top', 'left', 'bottom', 'right',
'border-radius',
'border-radius', 'gap',
],
selectorBlackList: ['html', 'ignore-to-rem'],
replace: true,
Expand Down
23 changes: 10 additions & 13 deletions publish/changeLog.md
@@ -1,18 +1,15 @@
如果你喜欢并经常使用洛雪音乐,并想要第一时间尝鲜洛雪的新功能,可以加入测试企鹅群768786588,
注意:测试版的功可能会不稳定,打算潜水的勿加。

### 新增

- 歌曲搜索框新增清理按钮,点击此按钮可以清理搜索框并返回初始搜索界面
- 新增“下载的歌词文件编码格式”设置,默认下载的歌词编码仍是`UTF-8`,对于某些在设备(如车机)上出现歌词中文乱码的用户可以尝试选择以`GBK`编码格式保存歌词文件
- 新增设置-桌面歌词-歌词字体设置,此设置可用于设置桌面歌词的字体(已知的问题:Windows 7 下可能会出现字体列表为空的情况,这是当前系统的 Powershell 版本小于5.1导致的,请自行**尝试**看常见解决)

### 优化

- 支持网易源“我喜欢”歌单以注入token的方式打开。由于网易源的“我喜欢”歌单需要登录才能打开(若你看不懂后半句就去阅读 常见问题-无法打开外部歌单),现若想要打开此类歌单,需要在歌单链接后面拼上 `###` 再加上有效的token,拼接格式:`[id|url]###token`,例子(最后面的xxxxxx替换成你的token):`https://music.163.com/#/playlist?id=123456&userid=123456###xxxxxx`
- 软件内快捷键的最小化触发时,如果已启用托盘,则隐藏程序,否则最小化程序
- 新增歌词简体中文转繁体中文,当软件语言被设置为繁体中文后,播放歌曲的歌词也将自动转成繁体中文显示
- 新增单个列表导入/导出功能,可以方便分享歌曲列表,可在右击“我的列表”里的列表名后弹出的菜单中使用
- 新增删除列表前的确认弹窗,防止误删列表
- 新增歌词文本选择复制功能,可在详情页进度条上方的歌词文本选择按钮进入歌词文本选择模式,选择完成后可鼠标右击或者使用系统快捷键复制
- 新增重复歌曲列表,可以方便移除我的列表中的重复歌曲,此列表会列出目标列表里歌曲名相同的歌曲,可在右击“我的列表”里的列表名后弹出的菜单中使用

### 修复

- 修复某些情况下同步功能会导致切歌混乱的问题
- 修复从电脑浏览器复制的企鹅歌单链接无法打开的问题
- 修复mg排行榜无法加载的问题
- 修复点击播放详情页的进度条跳进度时会出现偏移的问题
- 修复在有提示信息的地方长按鼠标按键时提示信息会闪烁的问题
- 修复下载歌曲时的歌词下载不尝试获取缓存歌词的问题
- 修复GNOME等桌面下每次打开应用时需重新设置歌词窗口置顶的问题
2 changes: 1 addition & 1 deletion publish/version.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/common/ipcNames.js
Expand Up @@ -33,6 +33,8 @@ const names = {

restart_window: 'restart_window',

lang_s2t: 'lang_s2t',

handle_kw_decode_lyric: 'handle_kw_decode_lyric',
get_lyric_info: 'get_lyric_info',
set_lyric_info: 'set_lyric_info',
Expand Down Expand Up @@ -74,6 +76,7 @@ const names = {
sync_generate_code: 'sync_generate_code',
sync_action_list: 'sync_action_list',
sync_list: 'sync_list',

},
winLyric: {
close: 'close',
Expand Down
6 changes: 5 additions & 1 deletion src/main/modules/winLyric/index.js
@@ -1,7 +1,7 @@
const path = require('path')
const { BrowserWindow } = require('electron')
const { winLyric: WIN_LYRIC_EVENT_NAME } = require('../../events/_name')
const { debounce } = require('../../../common/utils')
const { debounce, isLinux } = require('../../../common/utils')
const { getLyricWindowBounds } = require('./utils')

require('./event')
Expand Down Expand Up @@ -66,6 +66,10 @@ const winEvent = lyricWindow => {
if (global.appSetting.desktopLyric.isLock) {
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: false })
}
// linux下每次重开时貌似要重新设置置顶
if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) {
global.modules.lyricWindow.setAlwaysOnTop(global.appSetting.desktopLyric.isAlwaysOnTop, 'screen-saver')
}
})
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/rendererEvents/index.js
Expand Up @@ -25,3 +25,5 @@ require('./kw_decodeLyric')

require('./userApi')
require('./sync')
require('./s2t')

9 changes: 9 additions & 0 deletions src/main/rendererEvents/s2t.js
@@ -0,0 +1,9 @@
const { mainHandle, NAMES: { mainWindow: ipcMainWindowNames } } = require('../../common/ipc')
const { tranditionalize } = require('../utils/simplify-chinese-main')


mainHandle(ipcMainWindowNames.lang_s2t, async(event, textBase64) => {
if (!global.modules.mainWindow) throw new Error('mainWindow is undefined')
const text = tranditionalize(Buffer.from(textBase64, 'base64').toString())
return Buffer.from(text).toString('base64')
})
18 changes: 18 additions & 0 deletions src/main/utils/simplify-chinese-main/.gitignore
@@ -0,0 +1,18 @@
todo.md
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
package-lock.json
tsconfig.tsbuildinfo
report.*.json

.eslintcache
.DS_Store
.idea
.vscode
.yarn
*.suo
*.ntvs*
*.njsproj
*.sln
22 changes: 22 additions & 0 deletions src/main/utils/simplify-chinese-main/LICENSE.md
@@ -0,0 +1,22 @@

The MIT License (MIT)

Copyright (c) 2021 Shigma

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions src/main/utils/simplify-chinese-main/README.md
@@ -0,0 +1,10 @@
# simplify-chinese

Convert chinese characters between simplified form and tranditional form / 汉字简繁体转换工具。

```js
const { simplify, tranditionalize } = require('simplify-chinese')

console.log(simplify('窩窩頭')) // 窝窝头
console.log(tranditionalize('窝窝头')) // 窩窩頭
```

0 comments on commit b726ee4

Please sign in to comment.