Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Jul 9, 2022
2 parents d695cde + 9521bba commit aa4b094
Show file tree
Hide file tree
Showing 23 changed files with 1,970 additions and 2,035 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -30,5 +30,5 @@
"settings": {
"html/html-extensions": [".html", ".vue"]
},
"ignorePatterns": ["vendors", "*.min.js"]
"ignorePatterns": ["vendors", "*.min.js", "dist", "node_modules"]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,22 @@ 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.22.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.22.0...v1.22.1) - 2022-07-09

### 优化

- 歌单列表添加歌单内歌曲数量显示,注:目前只有kw、mg、wy、tx(部分)源支持显示

### 修复

- 修复处于不支持的源时,歌单、排行榜的右键下载菜单没有禁用的问题
- 修复若桌面歌词窗口与主窗口重叠时,鼠标划过重叠区域鼠标会闪烁的问题,注:此修复只对未启用“鼠标移入歌词区域时降低歌词透明度”时有效
- 修复tx源搜索失效的问题

### 其他

- 升级Electron到 v17.4.10

## [1.22.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.21.0...v1.22.0) - 2022-06-19

### 新增
Expand Down
3,799 changes: 1,835 additions & 1,964 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 19 additions & 20 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "1.22.0",
"version": "1.22.1",
"description": "一个免费的音乐查找助手",
"main": "./dist/main.js",
"productName": "lx-music-desktop",
Expand Down Expand Up @@ -178,40 +178,38 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/core": "^7.18.6",
"@babel/eslint-parser": "^7.18.2",
"@babel/plugin-proposal-class-properties": "^7.17.12",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-modules-umd": "^7.18.0",
"@babel/plugin-transform-runtime": "^7.18.5",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.18.2",
"@babel/plugin-transform-modules-umd": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.18.6",
"@babel/preset-env": "^7.18.6",
"babel-loader": "^8.2.5",
"babel-preset-minify": "^0.5.2",
"browserslist": "^4.20.4",
"browserslist": "^4.21.1",
"chalk": "^4.1.2",
"changelog-parser": "^2.8.1",
"copy-webpack-plugin": "^11.0.0",
"core-js": "^3.23.1",
"core-js": "^3.23.3",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.0.0",
"del": "^6.1.1",
"electron": "^17.4.7",
"electron-builder": "^23.1.0",
"electron": "^17.4.10",
"electron-builder": "^23.3.0",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.4.161",
"electron-updater": "^5.0.5",
"eslint": "^8.18.0",
"electron-to-chromium": "^1.4.184",
"electron-updater": "^5.1.0",
"eslint": "^8.19.0",
"eslint-config-standard": "^17.0.0",
"eslint-formatter-friendly": "git+https://github.com/lyswhut/eslint-friendly-formatter.git#2170d1320e2fad13615a9dcf229669f0bb473a53",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-webpack-plugin": "^3.1.1",
"eslint-webpack-plugin": "^3.2.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"less": "^4.1.3",
Expand All @@ -233,17 +231,17 @@
"terser-webpack-plugin": "^5.3.3",
"url-loader": "^4.1.1",
"vue-loader": "^17.0.0",
"vue-template-compiler": "^2.7.0-beta.2",
"vue-template-compiler": "^2.7.4",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2",
"webpack-dev-server": "^4.9.3",
"webpack-hot-middleware": "git+https://github.com/lyswhut/webpack-hot-middleware.git#329c4375134b89d39da23a56a94db651247c74a1",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"bufferutil": "^4.0.6",
"crypto-js": "^4.1.1",
"electron-log": "^4.4.7",
"electron-log": "^4.4.8",
"electron-store": "^8.0.2",
"font-list": "git+https://github.com/lyswhut/node-font-list.git#4edbb1933b49a9bac1eedd63a31da16b487fe57d",
"http-terminator": "^3.2.0",
Expand All @@ -261,11 +259,12 @@
"utf-8-validate": "^5.0.9",
"vue": "^3.2.37",
"vue-i18n": "^9.2.0-beta.36",
"vue-router": "^4.1.0-aabe509",
"vue-router": "^4.1.1",
"vuex": "^4.0.2"
},
"overrides": {
"async": "^2.3.0",
"got": "^11.8.5",
"svg-sprite-loader": {
"postcss": "8.2.13"
}
Expand Down
23 changes: 5 additions & 18 deletions publish/changeLog.md
@@ -1,26 +1,13 @@
### 新增

- 新增设置-以全屏模式启动设置
- 新增设置-桌面歌词设置-鼠标移入歌词区域时降低歌词透明度(#883),默认关闭,此设置不支持linux,注:此功能存在兼容性问题,若鼠标移出后无法恢复到正常透明度,可尝试再移入移出即可恢复

### 优化

- 添加歌曲到“我的列表”时,若按住`ctrl`键(Mac对应`Command`),则不会自动关闭添加窗口,这对想要将同一首(一批)歌曲添加到多个列表时会很有用
- 支持mg源逐字歌词的播放,感谢 @mozbugbox 提供的帮助
- 添加歌曲列表更新操作的二次确认
- 添加导入文件错误时的指引提示
- 歌单列表添加歌单内歌曲数量显示,注:目前只有kw、mg、wy、tx(部分)源支持显示

### 修复

- 修复若配置了`http_proxy`环境变量时,会意外使用此代理配置的问题
- 修复多选后切换列表后不会清空多选内容的问题
- 修复设置快捷键时的处理逻辑问题
- 修复在新建歌单输入框、歌单内歌曲搜索输入框会意外触发设置的全局快捷键的问题(#879

### 文档

桌面版文档已迁移到:<https://lyswhut.github.io/lx-music-doc/desktop>
- 修复处于不支持的源时,歌单、排行榜的右键下载菜单没有禁用的问题
- 修复若桌面歌词窗口与主窗口重叠时,鼠标划过重叠区域鼠标会闪烁的问题,注:此修复只对未启用“鼠标移入歌词区域时降低歌词透明度”时有效
- 修复tx源搜索失效的问题

### 其他

- 更新 Electron 到 v17.4.7
- 升级Electron到 v17.4.10
2 changes: 1 addition & 1 deletion publish/version.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/common/hotKey.js
Expand Up @@ -65,6 +65,7 @@ const hotKey = {
}

const keyName = {
common: names.mainWindow.name,
player: names.mainWindow.name,
desktop_lyric: names.winLyric.name,
}
Expand Down
15 changes: 7 additions & 8 deletions src/main/index.js
Expand Up @@ -83,14 +83,13 @@ app.on('open-url', (event, url) => {
init()
}
})
if (isDev && process.platform === 'win32') {
// Set the path of electron.exe and your app.
// These two additional parameters are only available on windows.
// console.log(process.execPath, process.argv)
app.setAsDefaultProtocolClient('lxmusic', process.execPath, process.argv.slice(1))
} else {
app.setAsDefaultProtocolClient('lxmusic')
}
// if (isDev && process.platform === 'win32') {
// // Set the path of electron.exe and your app.
// // These two additional parameters are only available on windows.
// // console.log(process.execPath, process.argv)
// app.setAsDefaultProtocolClient('lxmusic', process.execPath, process.argv.slice(1))
// }
if (!isDev) app.setAsDefaultProtocolClient('lxmusic')

const { navigationUrlWhiteList, themes } = require('../common/config')
const { getWindowSizeInfo, initSetting, updateSetting } = require('./utils')
Expand Down
11 changes: 9 additions & 2 deletions src/main/modules/winLyric/event.js
Expand Up @@ -9,6 +9,7 @@ let isEnable = null
let isAlwaysOnTop = null
let isAlwaysOnTopLoop = null
let isLockScreen = null
let isHoverHide = null

const alwaysOnTopTools = {
timeout: null,
Expand Down Expand Up @@ -48,9 +49,15 @@ const setLrcConfig = () => {
if (isLock != desktopLyric.isLock) {
isLock = desktopLyric.isLock
if (desktopLyric.isLock) {
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux })
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide })
} else {
global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux })
global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide })
}
}
if (isHoverHide != desktopLyric.isHoverHide) {
isHoverHide = desktopLyric.isHoverHide
if (!isLinux) {
global.modules.lyricWindow.setIgnoreMouseEvents(desktopLyric.isLock, { forward: global.appSetting.desktopLyric.isHoverHide })
}
}
if (isAlwaysOnTop != desktopLyric.isAlwaysOnTop) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/modules/winLyric/index.js
Expand Up @@ -64,7 +64,7 @@ const winEvent = lyricWindow => {
lyricWindow.once('ready-to-show', () => {
lyricWindow.show()
if (global.appSetting.desktopLyric.isLock) {
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux })
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide })
}
// linux下每次重开时貌似要重新设置置顶
if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/assets/svgs/headphones.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/renderer/assets/svgs/music.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/renderer/components/material/OnlineList/useMenu.js
@@ -1,4 +1,4 @@
import { computed, ref, useI18n, useCssModule, nextTick } from '@renderer/utils/vueTools'
import { computed, ref, reactive, useI18n, useCssModule, nextTick } from '@renderer/utils/vueTools'
import musicSdk from '@renderer/utils/music'

export default ({
Expand All @@ -13,7 +13,7 @@ export default ({
handleShowMusicAddModal,
handleOpenMusicDetail,
}) => {
const itemMenuControl = ref({
const itemMenuControl = reactive({
play: true,
addTo: true,
playLater: true,
Expand All @@ -31,38 +31,38 @@ export default ({
{
name: t('list__play'),
action: 'play',
disabled: !itemMenuControl.value.play,
disabled: !itemMenuControl.play,
},
{
name: t('list__download'),
action: 'download',
disabled: !itemMenuControl.value.download,
disabled: !itemMenuControl.download,
},
{
name: t('list__play_later'),
action: 'playLater',
disabled: !itemMenuControl.value.playLater,
disabled: !itemMenuControl.playLater,
},
{
name: t('list__search'),
action: 'search',
disabled: !itemMenuControl.value.search,
disabled: !itemMenuControl.search,
},
{
name: t('list__add_to'),
action: 'addTo',
disabled: !itemMenuControl.value.addTo,
disabled: !itemMenuControl.addTo,
},
{
name: t('list__source_detail'),
action: 'sourceDetail',
disabled: !itemMenuControl.value.sourceDetail,
disabled: !itemMenuControl.sourceDetail,
},
]
})

const showMenu = (event, musicInfo) => {
itemMenuControl.value.sourceDetail = !!musicSdk[musicInfo.source].getMusicDetailPageUrl
itemMenuControl.sourceDetail = !!musicSdk[musicInfo.source].getMusicDetailPageUrl
// this.listMenu.itemMenuControl.play =
// this.listMenu.itemMenuControl.playLater =
itemMenuControl.download = assertApiSupport(musicInfo.source)
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/core/share/list.js
Expand Up @@ -18,7 +18,10 @@ export const allListInit = (newLists) => {
}
allListUpdate(defaultList.id, newLists.defaultList.list)
allListUpdate(loveList.id, newLists.loveList.list)
if (newLists.tempList) allListUpdate(tempList.id, newLists.tempList.list)
if (newLists.tempList) {
allListUpdate(tempList.id, newLists.tempList.list)
tempList.meta = newLists.tempList.meta ?? {}
}
userLists.splice(0, userLists.length)
for (const { list, ...listInfo } of newLists.userList) {
allListUpdate(listInfo.id, list)
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/core/useApp/useDataInit.js
Expand Up @@ -94,7 +94,7 @@ const useListInit = ({
const usePlayInfoInit = () => {
const setPlayList = useCommit('player', 'setList')

return downloadList => {
return () => {
return getPlayInfo().then(info => {
window.restorePlayInfo = null
if (!info?.listId || info.index < 0) return
Expand Down Expand Up @@ -157,7 +157,7 @@ export default ({
]).catch(err => log.error(err))
music.init() // 初始化音乐sdk
await initList().catch(err => log.error(err)) // 初始化列表
await initPlayInfo(downloadList.value).catch(err => log.error(err)) // 初始化上次的歌曲播放信息
await initPlayInfo(downloadList).catch(err => log.error(err)) // 初始化上次的歌曲播放信息
await initSearchHistory(saveSearchHistoryListThrottle).catch(err => log.error(err)) // 初始化搜索历史记录
}
}
2 changes: 2 additions & 0 deletions src/renderer/utils/music/kw/songList.js
Expand Up @@ -137,6 +137,7 @@ export default {
author: item.uname,
name: item.name,
// time: item.publish_time,
total: item.total,
img: item.img,
grade: item.favorcnt / 10,
desc: item.desc,
Expand All @@ -153,6 +154,7 @@ export default {
id: `digest-${item.digest}__${item.id}`,
author: item.uname,
name: item.name,
total: item.total,
// time: item.publish_time,
img: item.img,
grade: item.favorcnt && item.favorcnt / 10,
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/utils/music/mg/songList.js
Expand Up @@ -284,6 +284,7 @@ export default {
// })
},
filterList(rawData) {
// console.log(rawData)
return rawData.map(item => ({
play_count: this.formatPlayCount(item.playCount),
id: item.playListId,
Expand All @@ -292,6 +293,7 @@ export default {
time: item.createTime,
img: item.image,
grade: item.grade,
total: item.contentCount,
desc: item.summary,
source: 'mg',
}))
Expand Down

0 comments on commit aa4b094

Please sign in to comment.