Compare commits

...

30 Commits

Author SHA1 Message Date
lyswhut
a126e5b4c8 发布0.13.0版本 2019-12-15 21:33:46 +08:00
lyswhut
033c3cd8e9 多修复选框不定状态到选中的Bug 2019-12-15 21:23:52 +08:00
lyswhut
50d029c671 移除Q音源的试听与下载 2019-12-15 21:03:19 +08:00
lyswhut
6a3f7e6150 修复搜索建议列表被弹出层覆盖的问题 2019-12-15 19:18:31 +08:00
lyswhut
aadfbefbe9 更新electron及vue到最新 2019-12-14 14:01:53 +08:00
lyswhut
edbcaf0f90 优化“信口雌黄”皮肤配色 2019-12-14 13:54:22 +08:00
lyswhut
207427e993 新增“离开搜索界面时清空搜索列表”设置 2019-12-13 13:34:35 +08:00
lyswhut
e109dd876a 修正缓存描述 2019-12-13 13:09:44 +08:00
lyswhut
64ac69c48b 聚合搜索新增音源显示 2019-12-11 16:05:07 +08:00
lyswhut
652b06c116 更新依赖到最新 2019-12-06 20:55:12 +08:00
lyswhut
654035a469 update issue template 2019-12-04 10:45:31 +08:00
lyswhut
cd50e0086b update issue template 2019-12-03 13:03:09 +08:00
lyswhut
66a119e9dc 新增搜索框搜索建议键盘上下方向键选择功能 2019-12-02 20:46:27 +08:00
lyswhut
14ec7d48f6 更新接口文字描述 2019-12-01 14:29:26 +08:00
lyswhut
5ad5b211e9 发布0.12.1版本 2019-12-01 13:51:13 +08:00
lyswhut
aac4b6ccfe 将所有外部链接从默认浏览器打开 2019-12-01 13:45:48 +08:00
lyswhut
cfc6967fdc 优化链接点击效果 2019-12-01 13:42:16 +08:00
lyswhut
8a0b960985 更新依赖到最新 2019-12-01 12:38:54 +08:00
lyswhut
bd260c3dc5 移除多余的字 2019-12-01 12:34:48 +08:00
lyswhut
203dff8d98 修复酷我源排行榜、歌单详情列表里的歌曲音质匹配问题 2019-11-30 18:36:44 +08:00
lyswhut
ca56089a3e 取消对导出数据的格式化 2019-11-29 21:47:13 +08:00
lyswhut
a012d1b927 更新依赖到最新 2019-11-29 21:35:42 +08:00
lyswhut
0af322a3a8 优化tab布局 2019-11-29 21:33:11 +08:00
lyswhut
8d743803c8 优化滚动方法 2019-11-29 00:01:04 +08:00
lyswhut
63fed77c5b 更新安装失败、缺少dll帮助 2019-11-25 16:58:16 +08:00
lyswhut
f2077dca04 新增数据传输结束时文件下载完成情况的判断 2019-11-25 11:44:31 +08:00
lyswhut
cccfb6a08a 歌曲无封面时下载报错的问题 2019-11-25 11:41:51 +08:00
lyswhut
fa6dead83d 更新依赖到最新 2019-11-24 19:38:45 +08:00
lyswhut
605418d750 更新electron到7.1.2 2019-11-21 20:20:31 +08:00
lyswhut
8aa869b2e4 更新appImage包的分类 2019-11-20 13:19:26 +08:00
29 changed files with 1583 additions and 1263 deletions

View File

@@ -1,5 +1,5 @@
---
name: 功能请求
name: 功能请求(请先查看常见问题及搜索issue列表中有无你要提的问题)
about: 为这个项目提出一个想法
title: 例如添加xxx功能、优化xxx功能
labels: ''

View File

@@ -1,5 +1,5 @@
---
name: 报告Bug
name: 报告Bug(请先查看常见问题及搜索issue列表中有无你要提的问题)
about: 创建报告以帮助我们改进
title: 例如:音乐无法播放
labels: ''

View File

@@ -6,6 +6,49 @@ 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/).
## [0.13.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.12.1...v0.13.0) - 2019-12-15
### 新增
- 新增搜索框搜索建议键盘上下方向键选择功能
- 聚合搜索新增音源显示
- 新增“离开搜索界面时清空搜索列表”设置选项,默认关闭,可到设置-强迫症设置开启
### 优化
- 优化“信口雌黄”皮肤配色
### 修复
- 修复存在弹出层时,搜索建议列表被弹出层覆盖的问题
- 修复搜索、排行榜、歌单列表多选框从不定状态到选中的Bug
### 移除
- 因Q音接口失效移除Q音源的试听与下载
### 其他
- 更新electron到7.1.5
- 更新vue到2.6.11
## [0.12.1](https://github.com/lyswhut/lx-music-desktop/compare/v0.12.0...v0.12.1) - 2019-12-01
### 优化
- 优化定位歌曲时的列表滚动机制
- 优化链接点击效果
### 修复
- 修复使用酷我源下载歌曲时,当歌曲无封面时下载报错的问题
- 修复酷我源排行榜、歌单详情列表里的歌曲音质匹配问题(原来无论歌曲有无高品、无损都会显示有)
- 禁止外部链接在软件内打开,将所有外部链接从默认浏览器打开
### 其他
- 更新electron到7.1.2
## [0.12.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.11.0...v0.12.0) - 2019-11-17
由于新下载库仍然没有完成但下载功能已经可用so 移除之前使用的第三方下载库,暂时把新下载库的下载模块直接加入本程序,若出现下载问题欢迎反馈!

9
FAQ.md
View File

@@ -55,7 +55,7 @@
软件启动后可以在任务栏看到软件但软件界面在桌面上无任何显示这一般是显卡驱动异常导致的由于软件默认使用GUP渲染界面当驱动异常时可能出现该情况可以用驱动管理软件检测下驱动尝试更新显卡驱动试试。
## 安装版安装失败,提示应用未安装
## 安装版安装失败,提示安装程序并未成功地运行完成
对于部分电脑出现安装失败的问题,可以做出以下尝试:
@@ -66,12 +66,15 @@
## 缺少`xxx.dll`
这个是电脑缺少某些dll导致的正常的系统是没有这个问题的解决办法需自行百度弹出的错误信息看下别人是怎么解决的。
这个是电脑缺少某些dll导致的正常的系统是没有这个问题的可以尝试如下几个解决办法:
- 以管理员权限打开`cmd`,输入`sfc /scannow`回车等待检查完成重启电脑
- 若上面的方法**修复、重启**电脑后仍然不行,就自行百度弹出的**错误信息**看下别人是怎么解决的
## 杀毒软件提示有病毒或恶意行为
本人只能保证我写的代码不包含任何**恶意代码**、**搜集用户信息**的行为并且软件代码已开源请自行查阅软件安装包也是由CI拉取源代码构建构建日志[windows包](https://ci.appveyor.com/project/lyswhut/lx-music-desktop)、[Mac/Linux包](https://travis-ci.org/lyswhut/lx-music-desktop)<br>
尽管如此但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时,软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。<br>
尽管如此但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时,软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。<br>
当然,以上说明建立的前提是在你所用的安装包是从**官方渠道**下载的,或者有相关能力者还可以下载源代码自己构建安装包。
最后,若出现杀毒软件报毒,请自行判断选择是否继续使用本软件!

2415
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": "0.12.0",
"version": "0.13.0",
"description": "一个免费的音乐下载助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
@@ -49,7 +49,7 @@
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly --fix src"
},
"browserslist": [
"Chrome >= 76"
"Electron >= 7.1.3"
],
"engines": {
"node": ">= 12"
@@ -110,7 +110,7 @@
},
"appImage": {
"license": "./licenses/license_zh.txt",
"category": "Audio"
"category": "Utility;AudioVideo;Audio;Player;Music;"
},
"publish": [
{
@@ -139,11 +139,11 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/core": "^7.7.5",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/polyfill": "^7.7.0",
"@babel/preset-env": "^7.7.1",
"autoprefixer": "^9.7.1",
"@babel/preset-env": "^7.7.6",
"autoprefixer": "^9.7.3",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-minify-webpack-plugin": "^0.3.1",
@@ -151,26 +151,26 @@
"cfonts": "^2.4.5",
"chalk": "^3.0.0",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^5.0.5",
"core-js": "^3.4.1",
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.5.0",
"cos-nodejs-sdk-v5": "^2.5.14",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"css-loader": "^3.3.2",
"del": "^5.1.0",
"electron": "^7.1.1",
"electron": "^7.1.5",
"electron-builder": "^22.1.0",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"eslint": "^6.6.0",
"eslint": "^6.7.2",
"eslint-config-standard": "^14.1.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-loader": "^3.0.2",
"eslint-loader": "^3.0.3",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"file-loader": "^4.2.0",
"file-loader": "^5.0.2",
"friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.10.3",
@@ -183,15 +183,15 @@
"pug": "^2.0.4",
"pug-loader": "^2.4.0",
"pug-plain-loader": "^1.0.0",
"raw-loader": "^3.1.0",
"raw-loader": "^4.0.0",
"rimraf": "^3.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"terser-webpack-plugin": "^2.2.1",
"url-loader": "^2.2.0",
"terser-webpack-plugin": "^2.3.0",
"url-loader": "^3.0.0",
"vue-loader": "^15.7.2",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
@@ -202,15 +202,15 @@
"axios": "^0.19.0",
"crypto-js": "^3.1.9-1",
"dnscache": "^1.0.2",
"electron-log": "^3.0.9",
"electron-log": "^4.0.0",
"electron-store": "^5.1.0",
"electron-updater": "^4.2.0",
"flac-metadata": "^0.1.1",
"js-htmlencode": "^0.3.0",
"lrc-file-parser": "^0.1.14",
"node-id3": "^0.1.12",
"lrc-file-parser": "^0.1.15",
"node-id3": "^0.1.13",
"request": "^2.88.0",
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-electron": "^1.0.6",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",

View File

@@ -1,17 +1,23 @@
由于新下载库仍然没有完成但下载功能已经可用so 移除之前使用的第三方下载库,暂时把新下载库的下载模块直接加入本程序,若出现下载问题欢迎反馈!
### 新增
- 新增下载功能对代理设置的支持,现在若在软件设置了代理服务器,下载功能也将会走代理网络了
- 新增搜索框搜索建议键盘上下方向键选择功能
- 聚合搜索新增音源显示
- 新增“离开搜索界面时清空搜索列表”设置选项,默认关闭,可到设置-强迫症设置开启
### 优化
- 新下载模块将对恢复下载的任务进行字节校验用于解决下载进度超过100%后仍然下载的问题
- 注意:目前仍然无法暂停处于**链接获取**状态中的任务
- 优化“信口雌黄”皮肤配色
### 修复
- 修复Linux deb版本`.desktop`桌面文件缺少图标的问题,新增中文名称显示、软件分类,感谢@lowy的反馈
- 修复下载列表歌曲状态分类列表操作Bug
- 修复歌曲封面下载失败时仍然执行嵌入封面操作导致报错的问题
- 跳过重复添加**相同歌曲名与扩展名的歌曲**例如你之前下载了A歌曲的128k音质现在想要下载它的320k音质但由于两者都是MP3格式会因为重名导致之前的128k音质被覆盖但列表中仍然显示两种音质的问题但实际上都是指向后面的320k音质
- 修复存在弹出层时,搜索建议列表被弹出层覆盖的问题
- 修复搜索、排行榜、歌单列表多选框从不定状态到选中的Bug
### 移除
- 因Q音接口失效移除Q音源的试听与下载
### 其他
- 更新electron到7.1.5
- 更新vue到2.6.11

View File

@@ -1,7 +1,15 @@
{
"version": "0.12.0",
"desc": "<p>由于新下载库仍然没有完成但下载功能已经可用so 移除之前使用的第三方下载库,暂时把新下载库的下载模块直接加入本程序,若出现下载问题欢迎反馈!</p>\n<h3>新增</h3>\n<ul>\n<li>新增下载功能对代理设置的支持,现在若在软件设置了代理服务器,下载功能也将会走代理网络了</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>新下载模块将对恢复下载的任务进行字节校验用于解决下载进度超过100%后仍然下载的问题</li>\n<li>注意:目前仍然无法暂停处于<strong>链接获取</strong>状态中的任务</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复Linux deb版本<code>.desktop</code>桌面文件缺少图标的问题,新增中文名称显示、软件分类,感谢@lowy的反馈</li>\n<li>修复下载列表歌曲状态分类列表操作Bug</li>\n<li>修复歌曲封面下载失败时仍然执行嵌入封面操作导致报错的问题</li>\n<li>跳过重复添加<strong>相同歌曲名与扩展名的歌曲</strong>例如你之前下载了A歌曲的128k音质现在想要下载它的320k音质但由于两者都是MP3格式会因为重名导致之前的128k音质被覆盖但列表中仍然显示两种音质的问题但实际上都是指向后面的320k音质</li>\n</ul>\n",
"version": "0.13.0",
"desc": "<h3>新增</h3>\n<ul>\n<li>新增搜索框搜索建议键盘上下方向键选择功能</li>\n<li>聚合搜索新增音源显示</li>\n<li>新增“离开搜索界面时清空搜索列表”设置选项,默认关闭,可到设置-强迫症设置开启</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>优化“信口雌黄”皮肤配色</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复存在弹出层时,搜索建议列表被弹出层覆盖的问题</li>\n<li>修复搜索、排行榜、歌单列表多选框从不定状态到选中的Bug</li>\n</ul>\n<h3>移除</h3>\n<ul>\n<li>因Q音接口失效移除Q音源的试听与下载</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>更新electron到7.1.5</li>\n<li>更新vue到2.6.11</li>\n</ul>\n",
"history": [
{
"version": "0.12.1",
"desc": "<h3>优化</h3>\n<ul>\n<li>优化定位歌曲时的列表滚动机制</li>\n<li>优化链接点击效果</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复使用酷我源下载歌曲时,当歌曲无封面时下载报错的问题</li>\n<li>修复酷我源排行榜、歌单详情列表里的歌曲音质匹配问题(原来无论歌曲有无高品、无损都会显示有)</li>\n<li>禁止外部链接在软件内打开,将所有外部链接从默认浏览器打开</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>更新electron到7.1.2</li>\n</ul>\n"
},
{
"version": "0.12.0",
"desc": "<p>由于新下载库仍然没有完成但下载功能已经可用so 移除之前使用的第三方下载库,暂时把新下载库的下载模块直接加入本程序,若出现下载问题欢迎反馈!</p>\n<h3>新增</h3>\n<ul>\n<li>新增下载功能对代理设置的支持,现在若在软件设置了代理服务器,下载功能也将会走代理网络了</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>新下载模块将对恢复下载的任务进行字节校验用于解决下载进度超过100%后仍然下载的问题</li>\n<li>注意:目前仍然无法暂停处于<strong>链接获取</strong>状态中的任务</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复Linux deb版本<code>.desktop</code>桌面文件缺少图标的问题,新增中文名称显示、软件分类,感谢@lowy的反馈</li>\n<li>修复下载列表歌曲状态分类列表操作Bug</li>\n<li>修复歌曲封面下载失败时仍然执行嵌入封面操作导致报错的问题</li>\n<li>跳过重复添加<strong>相同歌曲名与扩展名的歌曲</strong>例如你之前下载了A歌曲的128k音质现在想要下载它的320k音质但由于两者都是MP3格式会因为重名导致之前的128k音质被覆盖但列表中仍然显示两种音质的问题但实际上都是指向后面的320k音质</li>\n</ul>\n"
},
{
"version": "0.11.0",
"desc": "<h3>新增</h3>\n<ul>\n<li>新增歌曲缓冲定时器,尝试用于解决网络正常但是歌曲缓冲过久的问题</li>\n<li>新增下载管理的任务状态分类</li>\n<li>添加<strong>杀毒软件提示有病毒或恶意行为</strong>的说明,可到<strong>常见问题</strong>拉到最后查看(常见问题可在开源地址找到)</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>优化更新弹窗机制及其内容描述,对于可以自动更新的版本,现在可以看到软件的下载进度了</li>\n</ul>\n"

View File

@@ -6,6 +6,10 @@ const extReg = /^(\.(?:jpe?g|png)).*$/
module.exports = (filePath, meta) => {
if (!meta.APIC) return NodeID3.write(meta, filePath)
if (!/^http/.test(meta.APIC)) {
delete meta.APIC
return NodeID3.write(meta, filePath)
}
let picPath = filePath.replace(/\.mp3$/, '') + path.extname(meta.APIC).replace(extReg, '$1')
request(meta.APIC)
.on('response', respones => {
@@ -17,8 +21,12 @@ module.exports = (filePath, meta) => {
respones
.pipe(fs.createWriteStream(picPath))
.on('finish', () => {
meta.APIC = picPath
NodeID3.write(meta, filePath)
if (respones.complete) {
meta.APIC = picPath
NodeID3.write(meta, filePath)
} else {
delete meta.APIC
}
fs.unlink(picPath, err => {
if (err) console.log(err.message)
})

View File

@@ -23,7 +23,7 @@ import { mapMutations, mapGetters, mapActions } from 'vuex'
import { rendererOn, rendererSend } from '../common/ipc'
import { isLinux } from '../common/utils'
import music from './utils/music'
import { throttle } from './utils'
import { throttle, openUrl } from './utils'
window.ELECTRON_DISABLE_SECURITY_WARNINGS = process.env.ELECTRON_DISABLE_SECURITY_WARNINGS
dnscache({
enable: true,
@@ -109,6 +109,7 @@ export default {
...mapMutations('download', ['updateDownloadList']),
...mapMutations(['setSetting']),
init() {
document.body.addEventListener('click', this.handleBodyClick, true)
if (this.isProd && !isLinux) {
document.body.addEventListener('mouseenter', this.dieableIgnoreMouseEvents)
document.body.addEventListener('mouseleave', this.enableIgnoreMouseEvents)
@@ -228,6 +229,12 @@ export default {
clearTimeout(this.updateTimeout)
this.updateTimeout = null
},
handleBodyClick(event) {
if (event.target.tagName != 'A') return
if (event.target.host == window.location.host) return
event.preventDefault()
if (/^https?:\/\//.test(event.target.href)) openUrl(event.target.href)
},
},
beforeDestroy() {
this.clearUpdateTimeout()
@@ -235,6 +242,7 @@ export default {
document.body.removeEventListener('mouseenter', this.dieableIgnoreMouseEvents)
document.body.removeEventListener('mouseleave', this.enableIgnoreMouseEvents)
}
document.body.removeEventListener('click', this.handleBodyClick)
},
}
</script>

View File

@@ -57,6 +57,10 @@ table {
}
}
a {
color: #000;
}
.badge {
display: inline-block;
padding: 0.25em 0.4em;
@@ -112,7 +116,7 @@ svg {
transition-property: fill;
}
.hover {
.hover, a {
cursor: pointer;
transition: color .2s ease;
&:hover {
@@ -150,7 +154,7 @@ svg {
each(@themes, {
#container.@{value} {
.hover {
.hover, a {
&:hover {
color: ~'@{color-@{value}-theme}';
}

View File

@@ -7,7 +7,7 @@
// @color-theme: #03a678;
@color-theme: #4daf7c;
@color-theme-bgimg: none;
@color-theme-bgposition: center center;
@color-theme-bgposition: center;
@color-theme-bgsize: auto auto;
@color-theme-hover: fadeout(lighten(@color-theme, 10%), 30%);
@color-theme-active: fadeout(darken(@color-theme, 20%), 60%);
@@ -59,7 +59,7 @@
@color-green-theme: #4daf7c;
@color-green-theme-bgimg: none;
@color-green-theme-bgposition: center center;
@color-green-theme-bgposition: center;
@color-green-theme-bgsize: auto auto;
@color-green-theme-hover: fadeout(lighten(@color-green-theme, 10%), 30%);
@color-green-theme-active: fadeout(darken(@color-green-theme, 20%), 60%);
@@ -97,9 +97,9 @@
@color-green-tab-border-bottom: lighten(@color-green-theme, 5%);
@color-yellow-theme: #f2d35b;
@color-yellow-theme: #e9d460;
@color-yellow-theme-bgimg: none;
@color-yellow-theme-bgposition: center center;
@color-yellow-theme-bgposition: center;
@color-yellow-theme-bgsize: auto auto;
@color-yellow-theme-hover: fadeout(lighten(@color-yellow-theme, 10%), 30%);
@color-yellow-theme-active: fadeout(darken(@color-yellow-theme, 20%), 60%);
@@ -108,37 +108,37 @@
@color-yellow-theme_2: #fff;
@color-yellow-theme_2-background_1: #fff;
@color-yellow-theme_2-background_2: fadeout(@color-yellow-theme_2-background_1, 2%);
@color-yellow-theme_2-hover: fadeout(lighten(@color-yellow-theme, 10%), 70%);
@color-yellow-theme_2-active: fadeout(darken(@color-yellow-theme, 5%), 70%);
@color-yellow-theme_2-hover: fadeout(lighten(@color-yellow-theme, 10%), 60%);
@color-yellow-theme_2-active: fadeout(darken(@color-yellow-theme, 5%), 60%);
@color-yellow-theme_2-font: darken(@color-yellow-theme_2, 70%);
@color-yellow-theme_2-font-label: fadeout(@color-yellow-theme_2-font, 50%);
@color-yellow-theme_2-line: lighten(@color-yellow-theme, 35%);
@color-yellow-theme_2-font-label: fadeout(@color-yellow-theme_2-font, 40%);
@color-yellow-theme_2-line: lighten(@color-yellow-theme, 25%);
@color-yellow-theme-sidebar: @color-yellow-theme;
@color-yellow-btn: fadeout(darken(@color-yellow-theme, 5%), 15%);
@color-yellow-btn-background: fadeout(lighten(@color-yellow-theme, 25%), 70%);
@color-yellow-btn: fadeout(darken(@color-yellow-theme, 5%), 5%);
@color-yellow-btn-background: fadeout(lighten(@color-yellow-theme, 25%), 60%);
@color-yellow-pagination-background: fadeout(lighten(@color-yellow-theme, 30%), 30%);
@color-yellow-pagination-hover: fadeout(lighten(@color-yellow-theme, 5%), 70%);
@color-yellow-pagination-active: fadeout(darken(@color-yellow-theme, 5%), 70%);
@color-yellow-pagination-select: fadeout(lighten(@color-yellow-theme, 5%), 50%);
@color-yellow-search-form-background: fadeout(lighten(@color-yellow-theme, 35%), 10%);
@color-yellow-search-list-hover: fadeout(darken(@color-yellow-theme, 10%), 70%);
@color-yellow-scrollbar-track: fadeout(@color-yellow-theme, 80%);
@color-yellow-scrollbar-thumb: fadeout(@color-yellow-theme, 60%);
@color-yellow-scrollbar-thumb-hover: fadeout(@color-yellow-theme, 40%);
@color-yellow-search-form-background: fadeout(lighten(@color-yellow-theme, 25%), 10%);
@color-yellow-search-list-hover: fadeout(darken(@color-yellow-theme, 10%), 60%);
@color-yellow-scrollbar-track: fadeout(@color-yellow-theme, 60%);
@color-yellow-scrollbar-thumb: fadeout(@color-yellow-theme, 45%);
@color-yellow-scrollbar-thumb-hover: fadeout(@color-yellow-theme, 30%);
@color-yellow-player-pic-c1: fadeout(@color-yellow-theme_2, 50%);
@color-yellow-player-pic-c2: darken(@color-yellow-theme_2, 30%);
@color-yellow-player-progress: darken(@color-yellow-theme_2, 6%);
@color-yellow-player-progress-bar1: darken(@color-yellow-theme_2, 12%);
@color-yellow-player-progress-bar2: lighten(@color-yellow-theme, 12%);
@color-yellow-player-progress-bar2: lighten(@color-yellow-theme, 2%);
@color-yellow-player-status-text: lighten(@color-yellow-theme_2-font, 10%);
@color-yellow-tab-btn-background: fadeout(lighten(@color-yellow-theme, 10%), 80%);
@color-yellow-tab-btn-background: fadeout(lighten(@color-yellow-theme, 10%), 70%);
@color-yellow-tab-btn-background-hover: @color-yellow-theme_2-hover;
@color-yellow-tab-border-top: fadeout(lighten(@color-yellow-theme, 5%), 50%);
@color-yellow-tab-border-bottom: lighten(@color-yellow-theme, 5%);
@color-yellow-tab-border-top: fadeout(lighten(@color-yellow-theme, 5%), 40%);
@color-yellow-tab-border-bottom: @color-yellow-theme;
@color-orange-theme: #f5ab35;
@color-orange-theme-bgimg: none;
@color-orange-theme-bgposition: center center;
@color-orange-theme-bgposition: center;
@color-orange-theme-bgsize: auto auto;
@color-orange-theme-hover: fadeout(lighten(@color-orange-theme, 10%), 30%);
@color-orange-theme-active: fadeout(darken(@color-orange-theme, 20%), 60%);
@@ -177,7 +177,7 @@
@color-blue-theme: #3498db;
@color-blue-theme-bgimg: none;
@color-blue-theme-bgposition: center center;
@color-blue-theme-bgposition: center;
@color-blue-theme-bgsize: auto auto;
@color-blue-theme-hover: fadeout(lighten(@color-blue-theme, 10%), 30%);
@color-blue-theme-active: fadeout(darken(@color-blue-theme, 20%), 60%);
@@ -216,7 +216,7 @@
@color-red-theme: #d64541;
@color-red-theme-bgimg: none;
@color-red-theme-bgposition: center center;
@color-red-theme-bgposition: center;
@color-red-theme-bgsize: auto auto;
@color-red-theme-hover: fadeout(lighten(@color-red-theme, 10%), 30%);
@color-red-theme-active: fadeout(darken(@color-red-theme, 20%), 60%);
@@ -257,7 +257,7 @@
@color-purple-theme: #9b59b6;
@color-purple-theme-bgimg: none;
@color-purple-theme-bgposition: center center;
@color-purple-theme-bgposition: center;
@color-purple-theme-bgsize: auto auto;
@color-purple-theme-hover: fadeout(lighten(@color-purple-theme, 10%), 30%);
@color-purple-theme-active: fadeout(darken(@color-purple-theme, 20%), 60%);
@@ -296,7 +296,7 @@
@color-grey-theme: #6c7a89;
@color-grey-theme-bgimg: none;
@color-grey-theme-bgposition: center center;
@color-grey-theme-bgposition: center;
@color-grey-theme-bgsize: auto auto;
@color-grey-theme-hover: fadeout(lighten(@color-grey-theme, 10%), 30%);
@color-grey-theme-active: fadeout(darken(@color-grey-theme, 20%), 60%);
@@ -335,7 +335,7 @@
@color-midAutumn-theme: rgba(74, 55, 82, 1);
@color-midAutumn-theme-bgimg: url(../images/jqbg.jpg);
@color-midAutumn-theme-bgposition: center center;
@color-midAutumn-theme-bgposition: center;
@color-midAutumn-theme-bgsize: auto 100%;
@color-midAutumn-theme-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 30%);
@color-midAutumn-theme-active: fadeout(lighten(@color-midAutumn-theme, 15%), 60%);
@@ -374,7 +374,7 @@
@color-dhHyrz-theme: rgb(87, 144, 167);
@color-dhHyrz-theme-bgimg: url(../images/hzwbg.jpeg);
@color-dhHyrz-theme-bgposition: center center;
@color-dhHyrz-theme-bgposition: center;
@color-dhHyrz-theme-bgsize: auto 100%;
@color-dhHyrz-theme-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 45%);
@color-dhHyrz-theme-active: fadeout(lighten(@color-dhHyrz-theme, 15%), 60%);

View File

@@ -115,6 +115,9 @@ export default {
&:hover:not(.active) {
background-color: @color-theme-hover;
}
&:hover:not(.active) {
background-color: @color-theme-active;
}
}
}
}
@@ -141,6 +144,9 @@ each(@themes, {
&:hover:not(.active) {
background-color: ~'@{color-@{value}-theme-hover}';
}
&:active:not(.active) {
background-color: ~'@{color-@{value}-theme-active}';
}
}
}
}

View File

@@ -339,7 +339,7 @@ export default {
} else if (this.isAPITemp) {
list = this.list.filter(s => s.source == 'kw')
} else {
list = this.list
list = this.list.filter(s => s.source != 'tx')
}
if (!list.length) return this.setPlayIndex(-1)
let playIndex = this.list === list ? this.playIndex : list.indexOf(this.list[this.playIndex])

View File

@@ -13,7 +13,7 @@
<script>
import { rendererSend } from 'common/ipc'
import { mapGetters } from 'vuex'
import { mapGetters, mapMutations } from 'vuex'
import music from '../../utils/music'
import { debounce } from '../../utils'
export default {
@@ -34,15 +34,21 @@ export default {
source() {
return this.setting.search.tempSearchSource
},
isAutoClearInput() {
isAutoClearSearchInput() {
return this.setting.odc.isAutoClearSearchInput
},
isAutoClearSearchList() {
return this.setting.odc.isAutoClearSearchList
},
},
watch: {
route(n) {
if (this.isAutoClearInput && n.name != 'search' && this.searchText) this.searchText = ''
if (n.name != 'search') {
if (this.isAutoClearSearchInput && this.searchText) this.searchText = ''
if (this.isAutoClearSearchList) this.clearSearchList()
}
},
'storeSearchText'(n) {
storeSearchText(n) {
if (n !== this.searchText) this.searchText = n
},
searchText(n) {
@@ -62,6 +68,9 @@ export default {
}, 50)
},
methods: {
...mapMutations('search', {
clearSearchList: 'clearList',
}),
handleEvent({ action, data }) {
switch (action) {
case 'focus':
@@ -127,7 +136,7 @@ export default {
align-items: center;
padding-left: 15px;
-webkit-app-region: drag;
z-index: 1;
z-index: 100;
position: relative;
}
.input {

View File

@@ -71,9 +71,9 @@ export default {
let bool = this.bool
if (this.indeterminate) {
bool = true
// this.$nextTick(() => {
this.bool = true
// })
this.$nextTick(() => {
this.bool = bool
})
}
checked = bool
} else {

View File

@@ -4,7 +4,9 @@ div(:class="[$style.search, focus ? $style.active : '', big ? $style.big : '', s
input(:placeholder="placeholder" v-model.trim="text"
@focus="handleFocus" @blur="handleBlur" @input="$emit('input', text)"
@change="sendEvent('change')"
@keyup.enter="handleSearch")
@keyup.enter="handleSearch"
@keyup.40.prevent="handleKeyDown"
@keyup.38.prevent="handleKeyUp")
button(type="button" @click="handleSearch")
slot
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 30.239 30.239' space='preserve')
@@ -14,7 +16,7 @@ div(:class="[$style.search, focus ? $style.active : '', big ? $style.big : '', s
//- leave-active-class="animated flipOutX")
div(v-if="list" :class="$style.list" :style="listStyle")
ul(ref="dom_list")
li(v-for="(item, index) in list" :key="item" @click="handleTemplistClick(index)")
li(v-for="(item, index) in list" :key="item" :class="selectIndex === index ? $style.select : null" @mouseenter="selectIndex = index" @click="handleTemplistClick(index)")
span {{item}}
</template>
@@ -49,7 +51,7 @@ export default {
return {
isShow: false,
text: '',
index: null,
selectIndex: -1,
focus: false,
listStyle: {
height: 0,
@@ -59,6 +61,7 @@ export default {
watch: {
list(n) {
if (!this.visibleList) return
if (this.selectIndex > -1) this.selectIndex = -1
this.$nextTick(() => {
this.listStyle.height = this.$refs.dom_list.scrollHeight + 'px'
})
@@ -84,7 +87,8 @@ export default {
},
handleSearch() {
this.hideList()
this.sendEvent('submit')
if (this.selectIndex < 0) return this.sendEvent('submit')
this.sendEvent('listClick', this.selectIndex)
},
showList() {
this.isShow = true
@@ -93,6 +97,9 @@ export default {
hideList() {
this.isShow = false
this.listStyle.height = 0
this.$nextTick(() => {
this.selectIndex = -1
})
},
sendEvent(action, data) {
this.$emit('event', {
@@ -100,6 +107,12 @@ export default {
data,
})
},
handleKeyDown() {
this.selectIndex = this.selectIndex + 1 < this.list.length ? this.selectIndex + 1 : 0
},
handleKeyUp() {
this.selectIndex = this.selectIndex - 1 < -1 ? this.list.length - 1 : this.selectIndex - 1
},
},
}
</script>
@@ -187,7 +200,7 @@ export default {
.mixin-ellipsis-2;
}
&:hover {
&.select {
background-color: @color-search-list-hover;
}
&:last-child {
@@ -239,7 +252,7 @@ each(@themes, {
}
.list {
li {
&:hover {
&.select {
background-color: ~'@{color-@{value}-search-list-hover}';
}
}

View File

@@ -29,9 +29,9 @@ div(:class="$style.songList")
td(style="width: 20%; padding-left: 0; padding-right: 0;")
material-list-buttons(:index="index" :search-btn="true"
:remove-btn="false" @btn-click="handleListBtnClick"
:listAdd-btn="item.source == 'kw' || (!isAPITemp)"
:play-btn="item.source == 'kw' || (!isAPITemp)"
:download-btn="item.source == 'kw' || (!isAPITemp)")
:listAdd-btn="item.source == 'kw' || !isAPITemp"
:play-btn="item.source != 'tx' && (item.source == 'kw' || !isAPITemp)"
:download-btn="item.source != 'tx' && (item.source == 'kw' || !isAPITemp)")
//- button.btn-info(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k'] || item._types.flac" @click.stop='openDownloadModal(index)') 下载
//- button.btn-secondary(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k']" @click.stop='testPlay(index)') 试听
//- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)')
@@ -40,7 +40,7 @@ div(:class="$style.songList")
material-pagination(:count="total" :limit="limit" :page="page" @btn-click="handleTogglePage")
div(v-else :class="$style.noitem")
p(v-html="noItem")
material-flow-btn(:show="isShowEditBtn && (source == 'kw' || !isAPITemp)" :remove-btn="false" @btn-click="handleFlowBtnClick")
material-flow-btn(:show="isShowEditBtn && source != 'tx' && (source == 'kw' || !isAPITemp)" :remove-btn="false" @btn-click="handleFlowBtnClick")
</template>
<script>
@@ -140,7 +140,7 @@ export default {
this.clickIndex = index
return
}
this.emitEvent((this.source == 'kw' || !this.isAPITemp) ? 'testPlay' : 'search', index)
this.emitEvent((this.source != 'tx' && (this.source == 'kw' || !this.isAPITemp)) ? 'testPlay' : 'search', index)
this.clickTime = 0
this.clickIndex = -1
},

View File

@@ -110,13 +110,13 @@ export default {
display: inline-block;
border: none;
cursor: pointer;
padding: 5px 10px 7px;
padding: 0 10px;
font-size: 12px;
// color: @color-btn;
outline: none;
transition: background-color @transition-theme;
background-color: @color-tab-btn-background;
line-height: 28px;
}
&:hover {
// border-left-color: @color-theme_2-hover;

View File

@@ -88,7 +88,7 @@ const getUrl = (downloadInfo, isRefresh) => {
* 设置歌曲meta信息
* @param {*} downloadInfo
* @param {*} filePath
* @param {*} isEmbedPic
* @param {*} isEmbedPic // 是否嵌入图片
*/
const saveMeta = (downloadInfo, filePath, isEmbedPic) => {
if (downloadInfo.type === 'ape' || downloadInfo.type === 'flac') return

View File

@@ -126,7 +126,13 @@ class Task extends EventEmitter {
response
.on('data', this.__handleWriteData.bind(this))
.on('error', err => this.__handleError(err))
.on('end', () => this.__handleComplete())
.on('end', () => {
if (response.complete) {
this.__handleComplete()
} else {
this.__handleError(new Error('The connection was terminated while the message was still being sent'))
}
})
})
.on('error', err => this.__handleError(err))
.on('close', () => this.__closeWriteStream())

View File

@@ -42,22 +42,35 @@ export const b64DecodeUnicode = str => {
export const decodeName = str => str.replace(/&apos;/g, '\'')
export const scrollTo = (element, to, duration = 300, fn = function() {}) => {
const easeInOutQuad = (t, b, c, d) => {
t /= d / 2
if (t < 1) return (c / 2) * t * t + b
t--
return (-c / 2) * (t * (t - 2) - 1) + b
}
/**
* 设置滚动条位置
* @param {*} element 要设置滚动的容器 dom
* @param {*} to 滚动的目标位置
* @param {*} duration 滚动完成时间 ms
* @param {*} fn 滚动完成后的回调
*/
export const scrollTo = (element, to, duration = 300, fn = () => {}) => {
if (!element) return
const start = element.scrollTop || element.scrollY || 0
if (to > start) {
let maxScrollTop = element.scrollHeight - element.clientHeight
if (to > maxScrollTop) to = maxScrollTop
} else if (to < start) {
if (to < 0) to = 0
} else return fn()
const change = to - start
const increment = 10
if (!change) {
fn()
return
}
let currentTime = 0; let val
const easeInOutQuad = (t, b, c, d) => {
t /= d / 2
if (t < 1) return (c / 2) * t * t + b
t--
return (-c / 2) * (t * (t - 2) - 1) + b
}
if (!change) return fn()
let currentTime = 0
let val
const animateScroll = () => {
currentTime += increment
val = parseInt(easeInOutQuad(currentTime, start, change, duration))
@@ -83,13 +96,13 @@ export const checkPath = path => fs.existsSync(path)
/**
* 在资源管理器中打开目录
* 选择路径
* @param {*} 选项
*/
export const selectDir = options => rendererInvoke('selectDir', options)
/**
* 在资源管理器中打开目录
* 打开保存对话框
* @param {*} 选项
*/
export const openSaveDir = options => rendererInvoke('showSaveDialog', options)
@@ -164,7 +177,7 @@ export const isChildren = (parent, children) => {
* @param {*} setting
*/
export const updateSetting = setting => {
const defaultVersion = '1.0.13'
const defaultVersion = '1.0.14'
const defaultSetting = {
version: defaultVersion,
player: {
@@ -202,6 +215,7 @@ export const updateSetting = setting => {
},
odc: {
isAutoClearSearchInput: false,
isAutoClearSearchList: false,
},
search: {
searchSource: 'kw',
@@ -250,8 +264,8 @@ export const openUrl = url => {
* 设置标题
*/
let dom_title = document.getElementsByTagName('title')[0]
export const setTitle = title => {
dom_title.innerText = title || '洛雪音乐助手'
export const setTitle = (title = '洛雪音乐助手') => {
dom_title.innerText = title
}

View File

@@ -116,36 +116,37 @@ export default {
})
},
filterData(rawList, rawList2) {
// console.log(rawList)
// console.log(rawList.length, rawList2.length)
return rawList.map((item, inedx) => {
let formats = item.formats.split('|')
let types = []
let _types = {}
if (formats.indexOf('MP3128')) {
if (formats.includes('MP3128')) {
types.push({ type: '128k', size: null })
_types['128k'] = {
size: null,
}
}
// if (formats.indexOf('MP3192')) {
// if (formats.includes('MP3192')) {
// types.push({ type: '192k', size: null })
// _types['192k'] = {
// size: null,
// }
// }
if (formats.indexOf('MP3H')) {
if (formats.includes('MP3H')) {
types.push({ type: '320k', size: null })
_types['320k'] = {
size: null,
}
}
// if (formats.indexOf('AL')) {
// if (formats.includes('AL')) {
// types.push({ type: 'ape', size: null })
// _types.ape = {
// size: null,
// }
// }
if (formats.indexOf('ALFLAC')) {
if (formats.includes('ALFLAC')) {
types.push({ type: 'flac', size: null })
_types.flac = {
size: null,

View File

@@ -3,7 +3,7 @@ import { httpFetch } from '../../request'
export default {
getPic({ songmid }) {
const requestObj = httpFetch(`http://artistpicserver.kuwo.cn/pic.web?corp=kuwo&type=rid_pic&pictype=500&size=500&rid=${songmid}`)
requestObj.promise = requestObj.promise.then(({ body }) => body)
requestObj.promise = requestObj.promise.then(({ body }) => /^http/.test(body) ? body : null)
return requestObj
},
}

View File

@@ -186,19 +186,19 @@ export default {
let formats = item.formats.split('|')
let types = []
let _types = {}
if (formats.indexOf('MP3128')) {
if (formats.includes('MP3128')) {
types.push({ type: '128k', size: null })
_types['128k'] = {
size: null,
}
}
if (formats.indexOf('MP3H')) {
if (formats.includes('MP3H')) {
types.push({ type: '320k', size: null })
_types['320k'] = {
size: null,
}
}
if (formats.indexOf('ALFLAC')) {
if (formats.includes('ALFLAC')) {
types.push({ type: 'flac', size: null })
_types.flac = {
size: null,

View File

@@ -18,7 +18,7 @@
table
tbody
tr(v-for='(item, index) in list' :key='item.songmid' :id="'mid_' + item.songmid"
@click="handleDoubleClick(index)" :class="[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') ? $style.disabled : '']")
@click="handleDoubleClick(index)" :class="[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') || item.source == 'tx' ? $style.disabled : '']")
td.nobreak.center(style="width: 37px;" @click.stop)
material-checkbox(:id="index.toString()" v-model="selectdData" :value="item")
td.break(style="width: 25%;")
@@ -243,7 +243,7 @@ export default {
this.clickIndex = -1
},
testPlay(index) {
if (this.isAPITemp && this.list[index].source != 'kw') return
if (this.list[index].source == 'tx' || (this.isAPITemp && this.list[index].source != 'kw')) return
this.setPlayList({ list: this.list, listId: this.listId, index })
},
handleRemove(index) {
@@ -253,7 +253,7 @@ export default {
switch (info.action) {
case 'download': {
const minfo = this.list[info.index]
if (this.isAPITemp && minfo.source != 'kw') return
if ((this.isAPITemp && minfo.source != 'kw') || minfo.source == 'tx') return
this.musicInfo = minfo
this.$nextTick(() => {
this.isShowDownload = true
@@ -286,7 +286,7 @@ export default {
this.selectdData = []
},
handleAddDownloadMultiple(type) {
const list = this.setting.apiSource == 'temp' ? this.selectdData.filter(s => s.source == 'kw') : [...this.selectdData]
const list = this.setting.apiSource == 'temp' ? this.selectdData.filter(s => s.source == 'kw') : this.selectdData.filter(s => s.source != 'tx')
this.createDownloadMultiple({ list, type })
this.resetSelect()
this.isShowDownloadMultiple = false

View File

@@ -26,12 +26,13 @@
| {{item.name}}
span.badge.badge-info(v-if="item._types['320k']") 高品质
span.badge.badge-success(v-if="item._types.ape || item._types.flac") 无损
span(:class="$style.labelSource" v-if="searchSourceId == 'all'") {{item.source}}
td.break(style="width: 20%;") {{item.singer}}
td.break(style="width: 25%;") {{item.albumName}}
td(style="width: 15%; padding-left: 0; padding-right: 0;")
material-list-buttons(:index="index" :remove-btn="false" :class="$style.listBtn"
:play-btn="item.source == 'kw' || !isAPITemp"
:download-btn="item.source == 'kw' || !isAPITemp"
:play-btn="item.source != 'tx' && (item.source == 'kw' || !isAPITemp)"
:download-btn="item.source != 'tx' && (item.source == 'kw' || !isAPITemp)"
@btn-click="handleListBtnClick")
td(style="width: 10%;") {{item.interval || '--/--'}}
div(:class="$style.pagination")
@@ -40,7 +41,7 @@
p 搜我所想~~😉
material-download-modal(:show="isShowDownload" :musicInfo="musicInfo" @select="handleAddDownload" @close="isShowDownload = false")
material-download-multiple-modal(:show="isShowDownloadMultiple" :list="selectdData" @select="handleAddDownloadMultiple" @close="isShowDownloadMultiple = false")
material-flow-btn(:show="isShowEditBtn && (searchSourceId == 'kw' || searchSourceId == 'all' || !isAPITemp)" :remove-btn="false" @btn-click="handleFlowBtnClick")
material-flow-btn(:show="isShowEditBtn && searchSourceId != 'tx' && (searchSourceId == 'kw' || searchSourceId == 'all' || !isAPITemp)" :remove-btn="false" @btn-click="handleFlowBtnClick")
material-list-add-modal(:show="isShowListAdd" :musicInfo="musicInfo" @close="isShowListAdd = false")
material-list-add-multiple-modal(:show="isShowListAddMultiple" :musicList="selectdData" @close="handleListAddModalClose")
</template>
@@ -189,7 +190,7 @@ export default {
targetSong = this.selectdData[0]
this.listAddMultiple({ id: 'default', list: this.filterList(this.selectdData) })
} else {
if (this.isAPITemp && this.listInfo.list[index].source != 'kw') return
if (this.listInfo.list[index].source == 'tx' || (this.isAPITemp && this.listInfo.list[index].source != 'kw')) return
targetSong = this.listInfo.list[index]
this.listAdd({ id: 'default', musicInfo: targetSong })
}
@@ -238,7 +239,7 @@ export default {
}
},
filterList(list) {
return this.setting.apiSource == 'temp' ? list.filter(s => s.source == 'kw') : [...list]
return this.setting.apiSource == 'temp' ? list.filter(s => s.source == 'kw') : list.filter(s => s.source != 'tx')
},
handleListAddModalClose(isSelect) {
if (isSelect) this.resetSelect()
@@ -291,6 +292,13 @@ export default {
.listBtn {
min-height: 24px;
}
.labelSource {
color: @color-theme;
padding: 5px;
font-size: .8em;
line-height: 1;
opacity: .75;
}
.pagination {
text-align: center;
padding: 15px 0;

View File

@@ -93,6 +93,10 @@ div.scroll(:class="$style.setting")
h3 离开搜索界面时清空搜索框
div
material-checkbox(id="setting_odc_isAutoClearSearchInput" v-model="current_setting.odc.isAutoClearSearchInput" label="是否启用")
dd
h3 离开搜索界面时清空搜索列表
div
material-checkbox(id="setting_odc_isAutoClearSearchList" v-model="current_setting.odc.isAutoClearSearchList" label="是否启用")
dt 备份与恢复
dd
h3 部分数据
@@ -108,7 +112,7 @@ div.scroll(:class="$style.setting")
material-btn(:class="[$style.btn, $style.gapLeft]" min @click="handleExportAllData") 导出
dt 其他
dd
h3 缓存大小清理缓存后图片等资源将需要重新下载不建议清软件会自动将大小维持在200M左右
h3 缓存大小清理缓存后图片等资源将需要重新下载不建议清软件会根据磁盘空间动态管理缓存大小
div
p
| 软件已使用缓存大小
@@ -241,6 +245,7 @@ export default {
},
odc: {
isAutoClearSearchInput: false,
isAutoClearSearchList: false,
},
windowSizeId: 1,
themeId: 0,
@@ -267,25 +272,14 @@ export default {
},
],
apiSources: [
// {
// id: 'messoer',
// // label: '由 messoer 提供的接口(推荐,软件的所有功能都可用)',
// label: '由 messoer 提供的接口(该接口已关闭)',
// disabled: true,
// },
// {
// id: 'internal',
// label: '内置接口只能试听或下载128k音质该接口支持软件的所有功能',
// disabled: false,
// },
{
id: 'test',
label: '测试接口(几乎软件的所有功能都可用,该接口访问速度略慢',
label: '测试接口(几乎软件的所有功能都可用)',
disabled: false,
},
{
id: 'temp',
label: '临时接口(软件的某些功能不可用,该接口比测试接口快一些,建议测试接口不可用再使用本接口)',
label: '临时接口(软件的某些功能不可用,建议测试接口不可用再使用本接口)',
disabled: false,
},
],
@@ -365,7 +359,7 @@ export default {
type: 'setting',
data: this.setting,
}
fs.writeFile(path, JSON.stringify(data, null, 2), 'utf8', err => {
fs.writeFile(path, JSON.stringify(data), 'utf8', err => {
console.log(err)
})
},
@@ -395,7 +389,7 @@ export default {
this.loveList,
],
}
fs.writeFile(path, JSON.stringify(data, null, 2), 'utf8', err => {
fs.writeFile(path, JSON.stringify(data), 'utf8', err => {
console.log(err)
})
},
@@ -424,7 +418,7 @@ export default {
this.loveList,
],
}
fs.writeFile(path, JSON.stringify(allData, null, 2), 'utf8', err => {
fs.writeFile(path, JSON.stringify(allData), 'utf8', err => {
console.log(err)
})
},

View File

@@ -183,10 +183,11 @@ export default {
let targetSong
if (index == null) {
targetSong = this.selectdData[0]
this.listAddMultiple({ id: 'default', list: this.selectdData })
this.listAddMultiple({ id: 'default', list: this.filterList(this.selectdData) })
this.resetSelect()
} else {
targetSong = this.listDetail.list[index]
if (targetSong.source == 'tx' || (this.isAPITemp && targetSong.source != 'kw')) return
this.listAdd({ id: 'default', musicInfo: targetSong })
}
let targetIndex = this.defaultList.list.findIndex(
@@ -234,7 +235,7 @@ export default {
case 'wy':
type = '128k'
}
this.createDownloadMultiple({ list: [...this.selectdData], type })
this.createDownloadMultiple({ list: this.filterList(this.selectdData), type })
this.resetSelect()
this.isShowDownloadMultiple = false
},
@@ -345,6 +346,9 @@ export default {
}
this.importSongListText = text.replace(regx, '$1')
},
filterList(list) {
return this.setting.apiSource == 'temp' ? list.filter(s => s.source == 'kw') : list.filter(s => s.source != 'tx')
},
/* addSongListDetail() {
// this.detailLoading = true
// this.getListDetailAll(this.selectListInfo.id).then(() => {