Merge branch 'dev'

pull/733/head v1.15.3
lyswhut 2021-11-21 12:13:30 +08:00
commit 94e9f01e62
17 changed files with 834 additions and 746 deletions

View File

@ -1,8 +1,9 @@
name: ✨功能请求
description: 为这个项目提出一个想法请先查看常见问题及搜索issue列表中有无你要提的问题
title: "[Feature]: <title>"
title: "[Feature]: "
body:
- type: checkboxes
id: check-answer
attributes:
label: 解决方案检查
description: 请确保你已完成以下所有操作
@ -12,24 +13,28 @@ body:
- label: 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>),但没有发现类似的问题
required: true
- type: textarea
id: problem-description
attributes:
label: 问题描述
description: 请添加清晰简洁的描述,说明你希望通过此功能请求解决的问题
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: 描述想要的解决方案
label: 描述想要的解决方案
description: 简洁明了地描述你要发生的事情
validations:
required: true
- type: textarea
id: alternatives-considered
attributes:
label: 描述考虑过的替代方案
label: 描述考虑过的替代方案
description: 对你考虑过的所有替代解决方案或功能的简洁明了的描述
validations:
required: false
- type: textarea
id: additional-information
attributes:
label: 附加信息
description: 如果你的问题需要进一步解释,或者想要表达其他内容,请在此处添加更多信息。(直接把图片、视频拖到编辑框即可添加图片或视频)

View File

@ -1,8 +1,9 @@
name: 🐞报告Bug
description: 报告bug请先查看常见问题及搜索issue列表中有无你要提的问题
title: "[Bug]: <title>"
title: "[Bug]: "
body:
- type: checkboxes
id: check-answer
attributes:
label: 解决方案检查
description: 请确保你已完成以下所有操作
@ -12,18 +13,21 @@ body:
- label: 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>),并没有发现类似的问题
required: true
- type: textarea
id: expected-behavior
attributes:
label: 预期行为
description: 对期望发生的事情的清晰简明描述
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: 实际行为
description: 对实际发生的事情的清晰简明描述
validations:
required: true
- type: input
id: version
attributes:
label: Lx Music 版本
description: 你使用什么版本的LX Music
@ -31,11 +35,13 @@ body:
validations:
required: true
- type: input
id: last-known-working-version
attributes:
label: 最后正常的版本
description: 如果有,请在此处填写最后正常的版本是多少?
placeholder: 1.15.0
- type: input
id: operating-system-version
attributes:
label: 操作系统版本
description: 您使用的是什么操作系统版本?在 Windows 上,单击开始按钮 > 设置 > 系统 > 关于;在 macOS 上,单击 Apple 菜单 > 关于本机;在 Linux 上,使用 lsb_release 或 uname -a
@ -43,6 +49,7 @@ body:
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: 附加信息
description: 如果你的问题需要进一步解释,或者你所遇到的问题不容易重现,请在此处添加更多信息。(直接把图片、视频拖到编辑框即可添加图片或视频)

View File

@ -4,6 +4,8 @@ module.exports = {
'vue-loader',
'webpack-dev-server',
'eslint',
'electron',
'electron-builder'
// 'eslint-config-standard'
]
}

View File

@ -6,6 +6,15 @@ 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.15.3](https://github.com/lyswhut/lx-music-desktop/compare/v1.15.2...v1.15.3) - 2021-11-21
### 修复
- 修复设置-控制按钮位置选项与下载歌词编码格式选项命名冲突导致选项显示异常的问题
- 修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题
- 修复潜在的音乐加载超时不会切歌的问题
- 修复因kw源歌词接口停用导致该源歌词获取失败的问题
## [1.15.2](https://github.com/lyswhut/lx-music-desktop/compare/v1.15.3...v1.15.2) - 2021-11-09
### 其他

1426
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "1.15.2",
"version": "1.15.3",
"description": "一个免费的音乐查找助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
@ -171,36 +171,36 @@
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-modules-umd": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.3",
"babel-preset-minify": "^0.5.1",
"browserslist": "^4.17.6",
"browserslist": "^4.18.1",
"cfonts": "^2.10.0",
"chalk": "^4.1.2",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^9.0.1",
"copy-webpack-plugin": "^10.0.0",
"core-js": "^3.19.1",
"cross-env": "^7.0.3",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.1.2",
"css-minimizer-webpack-plugin": "^3.1.4",
"del": "^6.0.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.891",
"electron-to-chromium": "^1.3.904",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-formatter-friendly": "^7.0.0",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-webpack-plugin": "^3.1.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^5.5.0",
@ -208,7 +208,7 @@
"less-loader": "^10.2.0",
"less-plugin-clean-css": "^1.5.1",
"markdown-it": "^12.2.0",
"mini-css-extract-plugin": "^2.4.4",
"mini-css-extract-plugin": "^2.4.5",
"node-loader": "^2.0.0",
"postcss": "^8.3.11",
"postcss-loader": "^6.2.0",
@ -223,7 +223,7 @@
"url-loader": "^4.1.1",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.62.1",
"webpack": "^5.64.2",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^3.11.2",
"webpack-hot-middleware": "^2.25.1",
@ -234,8 +234,8 @@
"crypto-js": "^4.1.1",
"electron-log": "^4.4.1",
"electron-store": "^8.0.1",
"electron-updater": "^4.3.9",
"font-list": "git+https://github.com/lyswhut/node-font-list.git#2ed3b4ee42e8a43373e8a30d87760c840725843e",
"electron-updater": "^4.6.1",
"font-list": "git+https://github.com/lyswhut/node-font-list.git#4edbb1933b49a9bac1eedd63a31da16b487fe57d",
"http-terminator": "^3.0.3",
"iconv-lite": "^0.6.3",
"image-size": "^1.0.0",
@ -244,7 +244,7 @@
"needle": "^3.0.0",
"node-id3": "^0.2.3",
"request": "^2.88.2",
"socket.io": "^4.3.2",
"socket.io": "^4.4.0",
"utf-8-validate": "^5.0.7",
"vue": "^2.6.14",
"vue-i18n": "^8.26.7",

View File

@ -1,3 +1,6 @@
### 其他
### 修复
- 降级electron到v13.4.0这修复了windows 7下播放歌曲时软件会崩溃的问题
- 修复设置-控制按钮位置选项与下载歌词编码格式选项命名冲突导致选项显示异常的问题
- 修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题
- 修复潜在的音乐加载超时不会切歌的问题
- 修复因kw源歌词接口停用导致该源歌词获取失败的问题

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@ const names = {
lang_s2t: 'lang_s2t',
handle_kw_decode_lyric: 'handle_kw_decode_lyric',
// handle_kw_decode_lyric: 'handle_kw_decode_lyric',
get_lyric_info: 'get_lyric_info',
set_lyric_info: 'set_lyric_info',
set_config: 'set_config',

View File

@ -21,7 +21,7 @@ require('./lyric')
require('./musicUrl')
require('./systemFonts')
require('./kw_decodeLyric')
// require('./kw_decodeLyric')
require('./userApi')
require('./sync')

File diff suppressed because one or more lines are too long

View File

@ -370,6 +370,7 @@ export default {
audio.addEventListener('playing', () => {
console.log('开始播放')
this.clearBufferTimeout()
this.statusText = this.$t('core.player.playing')
this.status = ''
this.startPlay()
@ -432,7 +433,6 @@ export default {
this.mediaBuffer.playTime = 0
audio.currentTime = playTime
}
this.clearBufferTimeout()
this.updatePositionState()
// if (this.musicInfo.lrc) window.lrc.play(audio.currentTime * 1000)

View File

@ -70,7 +70,7 @@ div(:class="$style.songList")
<script>
import { mapGetters } from 'vuex'
import { scrollTo, clipboardWriteText, assertApiSupport } from '../../utils'
import { clipboardWriteText, assertApiSupport } from '../../utils'
import musicSdk from '../../utils/music'
import { windowSizeList } from '@common/config'
export default {
@ -189,7 +189,7 @@ export default {
list(n) {
this.removeAllSelect()
if (!this.list.length) return
this.$nextTick(() => scrollTo(this.$refs.dom_scrollContent, 0))
this.$nextTick(() => this.$refs.list.scrollTo(0))
},
},
data() {

View File

@ -192,7 +192,7 @@ const getters = {
// listPlayIndex,
// isPlayList,
// isTempPlay,
// // musicInfo: state.playMusicInfo.musicInfo,
// musicInfo: state.playMusicInfo.musicInfo,
// })
// console.log(state.playMusicInfo)
@ -305,7 +305,7 @@ const actions = {
})
if (!filteredList.length) return commit('setPlayMusicInfo', null)
let listPlayIndex = playInfo.listPlayIndex
let listPlayIndex = filteredList.indexOf(state.listInfo.list[playInfo.listPlayIndex])
const currentListLength = state.listInfo.list.length - 1
if (listPlayIndex == -1 && currentListLength) {
listPlayIndex = prevListPlayIndex >= currentListLength ? 0 : prevListPlayIndex + 1
@ -380,7 +380,7 @@ const actions = {
})
if (!filteredList.length) return commit('setPlayMusicInfo', null)
let listPlayIndex = playInfo.listPlayIndex
let listPlayIndex = filteredList.indexOf(state.listInfo.list[playInfo.listPlayIndex])
const currentListLength = state.listInfo.list.length - 1
if (listPlayIndex == -1 && currentListLength) {
listPlayIndex = prevListPlayIndex > currentListLength ? currentListLength : prevListPlayIndex - 1

View File

@ -1,7 +1,63 @@
import { httpFetch } from '../../request'
import { decodeLyric } from './util'
import { decodeName } from '../../index'
export default {
formatTime(time) {
let m = parseInt(time / 60)
let s = (time % 60).toFixed(2)
return (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s)
},
sortLrcArr(arr) {
const lrcSet = new Set()
let lrc = []
let lrcT = []
for (const item of arr) {
if (lrcSet.has(item.time)) {
lrc.push(item)
} else {
lrcT.push(item)
lrcSet.add(item.time)
}
}
if (lrc.length) {
lrc.unshift(lrcT.shift())
} else {
lrc = lrcT
lrcT = []
}
return {
lrc,
lrcT,
}
},
transformLrc(songinfo, lrclist) {
return `[ti:${songinfo.songName}]\n[ar:${songinfo.artist}]\n[al:${songinfo.album}]\n[by:]\n[offset:0]\n${lrclist ? lrclist.map(l => `[${this.formatTime(l.time)}]${l.lineLyric}\n`).join('') : '暂无歌词'}`
},
getLyric(songId) {
const requestObj = httpFetch(`http://m.kuwo.cn/newh5/singles/songinfoandlrc?musicId=${songId}`)
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)
// console.log(body.data.lrclist)
// console.log(lrc, 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)) : '',
}
})
return requestObj
},
}
/* export default {
lrcInfoRxp: /<lyric>(.+?)<\/lyric>[\s\S]+<lyric_zz>(.+?)<\/lyric_zz>/,
parseLyricInfo(str) {
let result = str.match(this.lrcInfoRxp)
@ -10,6 +66,7 @@ export default {
getLyric(songId, isGetLyricx = false) {
const requestObj = httpFetch(`http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid=MUSIC_${songId}`)
requestObj.promise = requestObj.promise.then(({ statusCode, body }) => {
console.log(body)
if (statusCode != 200) return Promise.reject(new Error(JSON.stringify(body)))
let info = this.parseLyricInfo(body)
if (!info) return Promise.reject(new Error(JSON.stringify(body)))
@ -27,3 +84,4 @@ export default {
return requestObj
},
}
*/

View File

@ -1,5 +1,5 @@
import { httpGet, httpFetch } from '../../request'
import { rendererInvoke, NAMES } from '../../../../common/ipc'
// import { rendererInvoke, NAMES } from '../../../../common/ipc'
const kw_token = {
token: null,
@ -54,7 +54,7 @@ export const getToken = (retryNum = 0) => new Promise((resolve, reject) => {
})
})
export const decodeLyric = base64Data => rendererInvoke(NAMES.mainWindow.handle_kw_decode_lyric, base64Data)
// export const decodeLyric = base64Data => rendererInvoke(NAMES.mainWindow.handle_kw_decode_lyric, base64Data)
export const tokenRequest = async(url, options = {}) => {
let token = kw_token.token

View File

@ -157,7 +157,7 @@ div(:class="$style.main")
h3#download_lyric {{$t('view.setting.download_lyric_format')}}
div
material-checkbox(v-for="item in lrcFormatList" :key="item.id" :class="$style.gapLeft" :id="`setting_download_lrcFormat_${item.id}`"
name="setting_basic_control_btn_position" need v-model="current_setting.download.lrcFormat" :value="item.id" :label="item.name")
name="setting_download_lrcFormat" need v-model="current_setting.download.lrcFormat" :value="item.id" :label="item.name")
dt#sync {{$t('view.setting.sync')}}
dd