Compare commits

...

471 Commits

Author SHA1 Message Date
lyswhut
c5c89f9d9e Merge branch 'dev' 2022-01-01 15:28:19 +08:00
lyswhut
6a79f8ec0d 发布v1.16.0 2022-01-01 15:27:52 +08:00
lyswhut
aa940ef9f7 更新依赖 2022-01-01 15:06:46 +08:00
lyswhut
7a20f06cf4 修复界面切换问题 2022-01-01 15:06:17 +08:00
lyswhut
b9596f2a6e 更新新年皮肤 2022-01-01 14:37:40 +08:00
lyswhut
bb2dfc269c 修正错别字 2021-12-31 19:29:58 +08:00
lyswhut
684af4e7db 调整添加按钮宽度 2021-12-31 11:55:55 +08:00
lyswhut
1c946ac661 添加帮助图标 2021-12-31 11:48:11 +08:00
lyswhut
f8d06d38ab 修改右边位置时的控制按钮为windows风格 2021-12-31 10:07:05 +08:00
lyswhut
2a679c914b 降级node 2021-12-30 19:12:58 +08:00
lyswhut
3f8d5ed570 更新版本号 2021-12-27 18:14:58 +08:00
lyswhut
028c2f9f03 我的列表新增拖动调整位置功能 2021-12-27 18:14:43 +08:00
lyswhut
b783c0c227 修复列表无法重命名的问题 2021-12-27 15:57:02 +08:00
lyswhut
30787a372e 禁用拼写检查 2021-12-27 11:19:11 +08:00
lyswhut
b99169cc3b 更新说明 2021-12-25 22:56:59 +08:00
lyswhut
78cf146a92 修复潜在歌词滚动问题 2021-12-25 15:42:32 +08:00
lyswhut
b867167b78 优化 2021-12-24 19:31:50 +08:00
lyswhut
d8dfbf6995 更新版本号 2021-12-24 17:40:16 +08:00
lyswhut
c2d6737796 播放详情页新增音频可视化功能 2021-12-24 17:39:50 +08:00
lyswhut
dcfe055461 更新依赖 2021-12-24 11:40:31 +08:00
lyswhut
c86b1c259c 为播放详情页、桌面歌词添加延迟滚动,播放详情页略微减小已激活歌词的缩放大小及桌面歌词翻译大小 2021-12-24 11:06:00 +08:00
lyswhut
400c16ba2d 更新版本号 2021-12-23 17:49:37 +08:00
lyswhut
3ff0dbb7ef 优化歌单、排行榜一键播放按钮的播放机制 2021-12-23 15:28:01 +08:00
lyswhut
469a88f368 优化歌词滚动 2021-12-23 11:31:38 +08:00
lyswhut
217ff27e72 优化列表滚动性能 2021-12-23 10:37:51 +08:00
lyswhut
e337f7121b 为导出CSV文件头部自动应用相应翻译 2021-12-19 19:41:51 +08:00
lyswhut
665ac5ee99 更新版本号 2021-12-19 19:09:09 +08:00
lyswhut
f06c493458 调整评论组件位置 2021-12-19 18:23:42 +08:00
lyswhut
f383e47344 修复播放栏的歌曲添加按钮打开的添加窗口不会自动关闭的问题 2021-12-19 18:23:21 +08:00
lyswhut
e15518cd51 为CSV格式添加头部 2021-12-18 13:06:26 +08:00
lyswhut
27ce62dd4f 修复列表顺序同步问题 2021-12-18 13:03:26 +08:00
lyswhut
26202d8e56 更新版本号 2021-12-17 17:46:28 +08:00
lyswhut
d93b5a3374 支持对移动端的位置同步调整 2021-12-17 17:36:10 +08:00
lyswhut
e3acb7ce4e 同步功能添加对列表顺序调整的控制 2021-12-17 17:18:56 +08:00
lyswhut
5b7c965c48 更新依赖 2021-12-17 14:51:58 +08:00
lyswhut
5f1e670dd7 更新win图标 2021-12-16 17:29:58 +08:00
lyswhut
ab1562ea33 添加一个获取歌曲URL超时的定时器 2021-12-15 09:00:55 +08:00
lyswhut
2359a1444b 修复最小化托盘设置不起作用的问题 2021-12-14 23:00:20 +08:00
lyswhut
9075b6629f 整理事件代码 2021-12-14 20:24:11 +08:00
lyswhut
583e8c43d6 移除多余代码 2021-12-14 20:02:39 +08:00
lyswhut
26369dd14b 更新版本号 2021-12-14 17:47:27 +08:00
lyswhut
9d40e7c004 修复热搜词获取问题 2021-12-13 15:57:45 +08:00
lyswhut
267535844e 更新依赖 2021-12-13 14:10:32 +08:00
lyswhut
0f5d2189e0 修复无法关闭状态栏歌曲进度的问题 2021-12-13 14:07:26 +08:00
lyswhut
f76f4d9d29 修复保存歌曲进度设置问题 2021-12-13 13:12:50 +08:00
lyswhut
2ba5e40012 移除多余代码 2021-12-12 21:48:36 +08:00
lyswhut
1fe6ae4556 修复某些情况下切歌会导致错误的状态提示内容 2021-12-12 20:14:10 +08:00
lyswhut
3d8a1894f6 还原linux平台下的图标更改 2021-12-11 17:14:07 +08:00
lyswhut
70cfce833c 更新版本号 2021-12-11 16:24:27 +08:00
lyswhut
96c3034a07 修复调整当前播放歌曲的位置时会导致切歌的问题 2021-12-11 16:24:00 +08:00
lyswhut
5aad81c696 修复刚从线列表的歌曲无法批量添加、添加到我的列表后无法调整顺序等问题 2021-12-11 15:54:08 +08:00
lyswhut
b0e2f44f01 修复歌曲搜索多选不准确的问题 2021-12-11 15:32:56 +08:00
lyswhut
442e633800 修复无法移动歌曲的问题 2021-12-11 14:46:27 +08:00
lyswhut
5f1e788a25 调整linux、Mac平台下的图标大小 2021-12-11 13:50:05 +08:00
lyswhut
3808e7e78f 修改图标大小 2021-12-10 21:02:17 +08:00
lyswhut
650edc1b1e 修复歌曲排序描述 2021-12-10 20:28:04 +08:00
lyswhut
cb5e1bd795 更新依赖 2021-12-10 14:21:09 +08:00
lyswhut
3282557769 修复无法批量稍后播放的问题 2021-12-10 08:37:26 +08:00
lyswhut
dff18b6b9d 修复潜在报错 2021-12-09 17:51:51 +08:00
lyswhut
2a64ead1c4 添加加载超时时尝试刷新URL 2021-12-08 17:51:06 +08:00
lyswhut
eb0a61d35b 添加图片加载失败的处理 2021-12-08 17:18:37 +08:00
lyswhut
ddca70980e 修改托盘图标顺序 2021-12-07 17:48:01 +08:00
lyswhut
5aa3502ef5 调整黑色主题翻页器背景颜色 2021-12-07 15:07:23 +08:00
lyswhut
3b02703805 添加vue devtools 2021-12-07 11:32:19 +08:00
lyswhut
f39d13c8f8 更新版本号 2021-12-06 18:58:02 +08:00
lyswhut
16a203227a 修复问题 2021-12-06 18:56:56 +08:00
lyswhut
b350f133b0 新增将播放与下载的歌词转换为繁体中文选项 2021-12-06 16:07:12 +08:00
lyswhut
ec3a0e08c3 新增根据歌曲名、歌手名等字段对列表自动排序的功能 2021-12-06 15:33:36 +08:00
lyswhut
a96eea5e44 修复切换切歌模式切换时提示实时不更新的问题 2021-12-05 23:17:27 +08:00
lyswhut
0dc7815e35 新增将我的列表保存为TXT、CSV格式 2021-12-05 21:36:46 +08:00
lyswhut
7f6e1c25e9 修复列表搜索不能用键盘选择的问题 2021-12-05 19:16:33 +08:00
lyswhut
9291c35b00 修复某些歌曲评论的时间显示 2021-12-05 18:58:30 +08:00
lyswhut
90b67fc05c 优化快捷键设置 2021-12-04 20:32:22 +08:00
lyswhut
09afd2c6f8 修复列表高度计算问题 2021-12-04 19:10:04 +08:00
lyswhut
1def571191 添加源显示 2021-12-04 18:09:21 +08:00
lyswhut
ef52f2465e 优化 2021-12-04 17:32:02 +08:00
lyswhut
845e5de43f 移除日志 2021-12-04 17:28:55 +08:00
lyswhut
b7433264eb 更新版本号 2021-12-04 17:26:36 +08:00
lyswhut
60e606a413 修复问题 2021-12-04 17:25:21 +08:00
lyswhut
9afafec9d6 修复列表问题 2021-12-04 02:25:55 +08:00
lyswhut
c9cb84a28d 修复导入 2021-12-04 02:15:08 +08:00
lyswhut
8949383ade 修复列表操作问题 2021-12-04 01:55:36 +08:00
lyswhut
f732ea4dab 关闭devtools 2021-12-04 01:45:28 +08:00
lyswhut
162842415f 移除日志 2021-12-04 01:44:20 +08:00
lyswhut
07d200a752 修复同步问题 2021-12-04 01:30:34 +08:00
lyswhut
822e1ea6c9 修复搜索问题 2021-12-04 00:27:13 +08:00
lyswhut
f79ae1541d 修复批量下载 2021-12-04 00:00:19 +08:00
lyswhut
2dfa93383f 修复kw源某些歌曲的歌词提取异常的问题 2021-12-03 23:46:41 +08:00
lyswhut
1ab5db8507 添加vue eslint规则,修复问题 2021-12-03 23:45:03 +08:00
lyswhut
ccd951b5d3 修复 2021-12-03 22:27:36 +08:00
lyswhut
6259690d12 更新依赖 2021-12-03 22:12:42 +08:00
lyswhut
8059d9cd73 升级到 vue3 2021-12-03 22:11:11 +08:00
lyswhut
c6635e554a 更新依赖 2021-12-03 21:49:49 +08:00
lyswhut
d7ca662e70 更新说明 2021-11-29 10:45:55 +08:00
lyswhut
b6f885b250 优化歌词自动换源机制 2021-11-28 01:54:45 +08:00
lyswhut
63141c4ac9 优化进度条逻辑 2021-11-28 00:15:51 +08:00
lyswhut
94e9f01e62 Merge branch 'dev' 2021-11-21 12:13:30 +08:00
lyswhut
cffa74b1c2 发布v1.15.3 2021-11-21 12:12:00 +08:00
lyswhut
1fb917941e 更新依赖 2021-11-21 12:10:45 +08:00
lyswhut
08c6a4e2fb 修复列表切换问题 2021-11-19 22:15:58 +08:00
lyswhut
976be6d96f 修复因kw源歌词接口停用导致该源歌词获取失败的问题 2021-11-18 14:51:00 +08:00
lyswhut
fe95b45820 更新依赖 2021-11-13 23:29:18 +08:00
lyswhut
47dffeee76 修复潜在的音乐加载超时不会切歌的问题 2021-11-13 23:29:09 +08:00
lyswhut
be7b06f5c8 修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题 2021-11-13 23:29:00 +08:00
lyswhut
3a371f8d75 修复设置-控制按钮位置选项与下载歌词编码格式选项命名冲突导致选项显示异常的问题 2021-11-13 23:04:27 +08:00
lyswhut
fa97058895 优化字典#682 2021-11-13 21:57:01 +08:00
lyswhut
df9289367b 修改文案 2021-11-09 20:07:29 +08:00
lyswhut
3a824b1d5e 更新模板 2021-11-09 20:03:03 +08:00
lyswhut
6f72da87b1 Merge branch 'dev' of github.com:lyswhut/lx-music-desktop into dev 2021-11-09 19:34:55 +08:00
lyswhut
1b1c5ad6da Merge branch 'dev' 2021-11-09 18:37:40 +08:00
lyswhut
f4777f787c 发布v1.15.2 2021-11-09 18:37:19 +08:00
lyswhut
6bcf45fba7 降级electron到v13.4.0 2021-11-09 18:35:17 +08:00
lyswhut
1e8a05e313 更新问题模板 2021-11-09 16:54:55 +08:00
lyswhut
1cf0f2dd0b Merge branch 'dev' 2021-11-09 09:25:40 +08:00
lyswhut
25a0439928 发布v1.15.1 2021-11-09 09:25:13 +08:00
lyswhut
df20e97d60 添加媒体播放进度条的信息设置 2021-11-09 09:17:21 +08:00
lyswhut
fd764a28a4 更新electron到v15.3.1 2021-11-09 08:52:00 +08:00
lyswhut
81bd8fbb74 支持启动软件时恢复播放下载列表里的歌曲 2021-11-06 16:15:29 +08:00
lyswhut
47ee572640 更新依赖 2021-11-06 14:26:33 +08:00
lyswhut
a0b9553158 优化播放详情页的打开 2021-11-06 14:26:16 +08:00
lyswhut
7659a6cadf 更新说明 2021-11-03 16:30:31 +08:00
lyswhut
a65bae8243 移除过时的选项 2021-11-03 16:30:22 +08:00
lyswhut
421abac30a 更新依赖 2021-11-03 16:29:58 +08:00
lyswhut
0b11e97427 添加列表歌手、专辑的提示气泡 2021-11-03 16:27:13 +08:00
lyswhut
fbe1ff73f1 修复下载列表无法切下一首歌的问题 2021-11-03 16:26:43 +08:00
lyswhut
68e831468b 修复潜在播放详情页问题 2021-11-01 09:21:54 +08:00
lyswhut
e382f0dba0 优化下载功能的添加、删除、暂停任务时的流畅度 2021-10-31 21:50:57 +08:00
lyswhut
f0f92952d6 优化我的列表、下载列表等列表的滚动流畅度 2021-10-30 12:16:58 +08:00
lyswhut
58f016ca00 修复潜在同步问题 2021-10-30 10:07:08 +08:00
lyswhut
faff0edb4a 更新 2021-10-29 21:16:30 +08:00
lyswhut
5e9a9e5b55 移除多余代码 2021-10-29 20:29:28 +08:00
lyswhut
e182dde718 修复了某些情况下会列表同步失败,导致连接断开无限重连的问题 2021-10-29 20:09:43 +08:00
lyswhut
7dfc2e8736 修复列表数据过大导致同步失败的问题 2021-10-29 20:09:37 +08:00
lyswhut
b27a547fb8 修复某些情况下获取URL失败时会意外切歌的问题 2021-10-29 20:05:11 +08:00
lyswhut
379c752cf8 Merge branch 'dev' 2021-10-29 15:15:03 +08:00
lyswhut
35abdc63d4 降级 electron-builder 2021-10-29 15:14:41 +08:00
lyswhut
a386915b50 Merge branch 'dev' 2021-10-29 14:23:27 +08:00
lyswhut
ab16bc849d 发布v1.15.0 2021-10-29 14:23:03 +08:00
lyswhut
90007127ba 更新依赖 2021-10-29 14:21:04 +08:00
lyswhut
a1935cbdac 修复列表项高度随窗口的大小适配问题 2021-10-29 14:20:51 +08:00
lyswhut
7de91bd923 更新图标 2021-10-28 09:56:23 +08:00
lyswhut
cdbcae21ac 添加黑色托盘图标 2021-10-27 17:11:35 +08:00
lyswhut
ea62033cf3 修改图标 2021-10-27 16:21:41 +08:00
lyswhut
a48423944a 修复缺失的包问题 2021-10-27 14:22:02 +08:00
lyswhut
b7fb3cd208 调整图标尺寸 2021-10-27 14:21:32 +08:00
lyswhut
34825b5063 兼容桌面歌词以触摸的方式移动、调整大小 2021-10-26 15:51:48 +08:00
lyswhut
7737012103 更新依赖 2021-10-26 15:33:14 +08:00
lyswhut
3912a375c5 更新版本号 2021-10-26 14:44:35 +08:00
lyswhut
35ca6db1ee 优化我的列表、下载、歌单、排行榜列表性能 2021-10-26 14:44:15 +08:00
lyswhut
0d20869337 优化进入、离开播放详情页的性能 2021-10-26 10:30:01 +08:00
lyswhut
89d161268e 更新说明 2021-10-23 20:12:49 +08:00
lyswhut
5ae39ef8d3 更新依赖 2021-10-21 14:57:34 +08:00
lyswhut
e57696d4ff 优化开关评论时的动画性能 2021-10-17 13:49:35 +08:00
lyswhut
15c9a5468b 更新依赖 2021-10-15 20:08:46 +08:00
lyswhut
30318b7c61 更新版本号 2021-10-15 19:56:01 +08:00
lyswhut
8b0fc9bf5f 更新 Electron 到 v15.2.0 2021-10-15 19:54:48 +08:00
lyswhut
5fdba7720c 添加弹窗 2021-10-14 08:54:33 +08:00
lyswhut
ca12dc604d 完善评论 2021-10-13 12:00:02 +08:00
lyswhut
09f4d8ac0c 修复同一首歌的URL、歌词等同时需要换源时的处理问题 2021-10-09 10:21:34 +08:00
lyswhut
254b82cc60 修复kg源的歌单链接无法打开的问题 2021-10-07 20:01:19 +08:00
lyswhut
d4240006f1 自定义源新增version字段,新增utils.buffer.bufToString方法 2021-10-07 12:28:03 +08:00
lyswhut
68518e609d 增加自定义脚本名字长度 2021-10-07 10:22:30 +08:00
lyswhut
001eba6729 优化列表同步代码逻辑 2021-10-06 13:37:23 +08:00
lyswhut
ff47a224c7 Merge branch 'dev' 2021-10-04 12:28:08 +08:00
lyswhut
8810e25ea9 发布v1.14.1 2021-10-04 12:22:52 +08:00
lyswhut
eb67d67a60 修复v1.14.0出现的备份与恢复功能备份的数据无法恢复的问题 2021-10-04 12:22:16 +08:00
lyswhut
e12f95ff74 更新版本号 2021-10-03 11:00:20 +08:00
lyswhut
2fe213d060 修复我的列表搜索输入某些字符会导致应用崩溃的问题 2021-10-03 10:55:09 +08:00
lyswhut
b726ee42f7 Merge branch 'dev' 2021-10-02 13:43:46 +08:00
lyswhut
6b71b4709e 发布v1.14.0 2021-10-02 13:43:19 +08:00
lyswhut
0701b78720 优化英文歌曲名匹配 2021-10-01 22:47:55 +08:00
lyswhut
82d1ac1e83 更新依赖 2021-10-01 22:18:50 +08:00
lyswhut
8acf98631f 更新版本号 2021-10-01 22:16:08 +08:00
lyswhut
0a31d19561 新增重复歌曲列表 2021-10-01 22:15:45 +08:00
lyswhut
91279922f1 新增歌词文本选择复制功能 2021-10-01 12:30:07 +08:00
lyswhut
96804ae2e2 更新版本号 2021-09-30 16:45:20 +08:00
lyswhut
3ae8a89961 更新依赖 2021-09-30 16:44:32 +08:00
lyswhut
f8f13fd32c 优化歌词处理 2021-09-30 14:56:35 +08:00
lyswhut
ae61d2c629 调整位置 2021-09-30 14:56:24 +08:00
lyswhut
b1918e8b15 新增删除列表前的确认弹窗 2021-09-30 14:45:14 +08:00
lyswhut
ce7bca5b36 新增单个列表导入/导出功能 2021-09-30 14:27:32 +08:00
lyswhut
51be62bc29 更新依赖 2021-09-30 08:52:14 +08:00
Unintended
c1ff3971de Typo (#643) 2021-09-25 11:16:56 +08:00
Wei Yijun
57db286405 修复GNOME等桌面下每次打开应用时需重新设置歌词窗口置顶的问题 (#636) 2021-09-22 10:33:48 +08:00
lyswhut
592b670e96 更新版本号 2021-09-18 17:31:21 +08:00
lyswhut
97fdcaac51 新增歌词简体中文转繁体中文,当软件语言被设置为繁体中文后,播放歌曲的歌词也将自动转成繁体中文显示 2021-09-18 17:30:46 +08:00
lyswhut
271d9ac13e 更新依赖 2021-09-15 17:08:38 +08:00
lyswhut
b6cea110a7 修复在有提示信息的地方长按鼠标按键时提示信息会闪烁的问题 2021-09-11 15:39:02 +08:00
lyswhut
4b5dae4779 修复点击播放详情页的进度条跳进度时会出现偏移的问题 2021-09-10 14:31:07 +08:00
lyswhut
a250317a28 修复mg排行榜无法加载的问题 2021-09-09 16:45:10 +08:00
lyswhut
431605e793 Merge branch 'dev' of github.com:lyswhut/lx-music-desktop into dev 2021-09-07 22:20:06 +08:00
lyswhut
a4d3c06119 Merge branch 'dev' 2021-09-05 12:16:56 +08:00
lyswhut
246412cb2c 发布v1.13.0 2021-09-05 12:14:17 +08:00
lyswhut
2fb013fb41 修正排版 2021-09-05 12:13:44 +08:00
lyswhut
6f9d684b2d 复从电脑浏览器复制的企鹅歌单链接无法打开的问题 2021-09-05 12:13:32 +08:00
lyswhut
af6a2ec581 更新依赖 2021-09-04 21:24:42 +08:00
lyswhut
488b28921f 添加“Windows 7 下桌面歌词字体列表为空”问题解答 2021-08-29 21:31:44 +08:00
lyswhut
4c23fc1011 移除eiows包 2021-08-29 18:32:03 +08:00
lyswhut
db1c903f1b 更新版本号 2021-08-29 18:27:38 +08:00
lyswhut
3fdf7411fc 新增桌面歌词字体设置 2021-08-29 18:27:01 +08:00
lyswhut
1da275ff3a 更新依赖 2021-08-28 13:25:34 +08:00
lyswhut
bc5167f38d 使用中文括号 2021-08-26 16:21:26 +08:00
lyswhut
609b6f3123 更新版本号 2021-08-26 16:00:43 +08:00
lyswhut
fe35081e03 新增“下载的歌词文件编码格式”设置 2021-08-26 16:00:03 +08:00
lyswhut
72df1a35a0 更新推荐的DNS值 2021-08-26 08:54:58 +08:00
lyswhut
90ffcf5071 更新依赖 2021-08-25 16:29:11 +08:00
lyswhut
35f60cc536 添加说明 2021-08-24 08:46:42 +08:00
lyswhut
31bb40c50b 更新版本号 2021-08-23 11:25:53 +08:00
lyswhut
bc7b35f816 修复无法从歌单界面打开网易歌单详情的问题 2021-08-23 11:23:42 +08:00
lyswhut
0c76612a4c 更新版本号 2021-08-22 13:10:28 +08:00
lyswhut
ab86674aa3 软件内快捷键的最小化触发时,如果已启用托盘,则隐藏程序,否则最小化程序 2021-08-22 10:26:59 +08:00
lyswhut
8cd5a01dd5 更新依赖 2021-08-20 21:59:16 +08:00
lyswhut
4ef5bafcca 更新依赖 2021-08-20 21:56:15 +08:00
lyswhut
2c783e0657 修复错误 2021-08-20 11:15:51 +08:00
lyswhut
0c7ead5b21 Merge branch 'dev' of github.com:lyswhut/lx-music-desktop into dev 2021-08-19 19:27:42 +08:00
lyswhut
57a8b7842e 修复某些情况下列表同步不一致的问题 2021-08-19 15:23:29 +08:00
lyswhut
4b5a7b6a74 添加测试群 2021-08-18 17:04:38 +08:00
lyswhut
c09c31767d 更新依赖 2021-08-18 16:10:13 +08:00
lyswhut
ecff04618b 支持网易源“我喜欢”歌单以注入token的方式打开 2021-08-18 14:03:00 +08:00
lyswhut
c377469dad 歌曲搜索框新增清理按钮 2021-08-16 15:46:43 +08:00
lyswhut
ecb41382cb 更新常见问题 2021-08-16 09:10:23 +08:00
lyswhut
3150b12b99 修复重名问题 2021-08-15 19:45:11 +08:00
lyswhut
364260b070 修复某些情况下同步功能会导致切歌混乱的问题 2021-08-12 10:40:45 +08:00
lyswhut
5ccf6f077d Merge branch 'dev' 2021-08-11 17:07:02 +08:00
lyswhut
5b113c5c22 发布v1.12.2 2021-08-11 17:06:18 +08:00
lyswhut
ff53900ea3 修复同步服务器启动失败时,关闭同步服务不会清空失败信息的问题 2021-08-11 16:39:33 +08:00
lyswhut
b0b0403d9a 移除多余内容 2021-08-11 15:23:20 +08:00
lyswhut
21c3b3ab57 修复上一曲切换问题 2021-08-11 13:28:51 +08:00
lyswhut
e85709a341 修复稍后播放切歌问题 2021-08-11 11:57:41 +08:00
lyswhut
04be42a4d6 添加规则 2021-08-11 10:22:15 +08:00
lyswhut
8196e8a84d 更新依赖 2021-08-11 10:00:04 +08:00
lyswhut
1f85492690 修复播放下载列表的歌曲时切歌、歌词显示问题 2021-08-11 09:59:47 +08:00
lyswhut
e15178150b 移除日志 2021-08-08 12:16:22 +08:00
lyswhut
d83aee2507 Merge branch 'dev' 2021-08-08 11:54:46 +08:00
lyswhut
354a9904e9 发布v1.12.1 2021-08-08 11:54:21 +08:00
lyswhut
fe3379ffbb 修复随机播放下无法切歌的问题 2021-08-08 11:54:13 +08:00
lyswhut
0164936038 Merge branch 'dev' 2021-08-08 10:29:09 +08:00
lyswhut
9106d6455f 发布v1.12.0 2021-08-08 10:28:43 +08:00
lyswhut
5ddea2b1da 修复图片为空时设置歌曲信息出错的问题 2021-08-07 19:35:13 +08:00
lyswhut
2549c5587e 更新依赖 2021-08-07 13:45:44 +08:00
lyswhut
c9f28d8105 更新依赖 2021-08-05 10:39:59 +08:00
lyswhut
75b2db4749 添加播放器对系统媒体控制与显示的兼容处理 2021-08-05 10:21:20 +08:00
lyswhut
b6f291d721 添加提示语 2021-08-02 14:32:45 +08:00
lyswhut
4f7e227392 移除日志输出 2021-08-01 20:12:38 +08:00
lyswhut
7d95eb34c7 修复同步服务启动失败刷新连接码按钮仍然可以点击的问题 2021-08-01 20:11:38 +08:00
lyswhut
7e3ee38920 修复删除列表中正在播放的歌曲时不会自动切歌的问题 2021-08-01 20:07:40 +08:00
lyswhut
d44c2c26a8 修复beta版MAC包构建失败的问题 2021-08-01 13:46:16 +08:00
lyswhut
d77a41c20f 更新版本 2021-08-01 13:35:58 +08:00
lyswhut
c50c747691 完善代码 2021-08-01 13:28:12 +08:00
lyswhut
bcf3dde60d 完成同步功能 2021-08-01 12:57:13 +08:00
lyswhut
33ec3de1b4 更新依赖 2021-08-01 12:46:17 +08:00
lyswhut
26be5b5c4f 移除多余依赖 2021-07-23 22:01:34 +08:00
lyswhut
56af57c682 修复某些情况下所显示的歌词、封面图片与当前正在播放的歌曲不一致的问题 2021-07-23 16:14:56 +08:00
lyswhut
3a5cb3f7c2 修复导入kg歌单最多只能加载100、500首歌曲的问题 2021-07-21 15:33:41 +08:00
lyswhut
724c6be85b 禁用win arm版本的自动下载更新 2021-07-18 14:56:18 +08:00
lyswhut
1c4a56f95b Merge branch 'dev' 2021-07-18 13:59:58 +08:00
lyswhut
9c21e96538 发布v1.11.0 2021-07-18 13:56:26 +08:00
lyswhut
67074bd682 更新依赖 2021-07-17 16:40:52 +08:00
lyswhut
b535987392 更新依赖 2021-07-14 14:27:59 +08:00
lyswhut
d5c0c2e3d3 更新依赖 2021-07-10 12:26:14 +08:00
lyswhut
7580c79c00 替换过时API 2021-07-07 15:02:46 +08:00
lyswhut
c0a13622b0 更新依赖 2021-07-06 16:51:18 +08:00
lyswhut
58d7326f77 优化mg源打开歌单的链接兼容 2021-07-06 16:51:13 +08:00
lyswhut
45d7a12d0d 更新依赖 2021-07-05 10:08:44 +08:00
lyswhut
40b4f15340 更新说明 2021-07-02 14:58:14 +08:00
lyswhut
9c28ff67c1 更新 2021-07-02 10:28:32 +08:00
lyswhut
e3f146dabf 移除wy源歌单列表按“最新”排序的按钮 2021-06-30 11:55:32 +08:00
lyswhut
2b2a6a7f10 更新依赖 2021-06-30 11:44:51 +08:00
lyswhut
192574dfe8 更新依赖 2021-06-27 14:47:19 +08:00
lyswhut
8e95e06b2d 添加网易歌单无法打开的说明 2021-06-24 14:50:04 +08:00
lyswhut
1963b3ee71 修复mg源搜索失效的问题 2021-06-19 13:26:58 +08:00
lyswhut
507f66b3b6 修复dns查询问题 2021-06-18 15:13:15 +08:00
lyswhut
94bf9eae8b 更新依赖 2021-06-17 15:38:03 +08:00
lyswhut
0fa32f976c 移除日志输出 2021-06-16 16:24:39 +08:00
lyswhut
198238d4b5 优化网络请求,尝试去解决无法连接服务器的问题 2021-06-16 10:23:48 +08:00
lyswhut
66631ac105 修复进度条高度问题 2021-06-14 13:52:46 +08:00
lyswhut
19c5996351 更新依赖 2021-06-11 16:25:36 +08:00
lyswhut
cd3140a9c7 新增“添加歌曲到列表时的位置”设置 2021-06-11 15:45:09 +08:00
lyswhut
56201d6a01 更新依赖 2021-06-10 18:10:52 +08:00
lyswhut
654cb41e3e 添加 win arm64 架构的安装包构建 2021-06-07 09:04:34 +08:00
lyswhut
fa744d9204 添加i18n-ally扩展设置 2021-06-06 20:31:09 +08:00
lyswhut
3e1c56ff82 修复打包失败的问题 2021-06-05 12:18:43 +08:00
lyswhut
5d5164c4e9 更新依赖 2021-06-04 16:08:15 +08:00
lyswhut
0791e760a4 修复打开kw歌单失败时会无限重试的问题 2021-06-03 15:12:53 +08:00
lyswhut
b53fe2dd5e 优化wy源歌单导入匹配 2021-06-03 14:50:37 +08:00
lyswhut
1648b0c2dd 更新依赖 2021-05-31 17:12:53 +08:00
lyswhut
1a5adfabf4 更新依赖 2021-05-27 08:44:37 +08:00
lyswhut
c538e9c4fc Merge branch 'dev' 2021-05-25 16:19:49 +08:00
lyswhut
98422b296d 发布v1.10.2 2021-05-25 16:19:23 +08:00
lyswhut
e35068137d 修复企鹅音乐搜索歌曲没有结果的问题 2021-05-25 16:18:45 +08:00
lyswhut
83dda92603 Merge branch 'dev' 2021-05-25 15:42:13 +08:00
lyswhut
6bbcb519d7 发布v1.10.1 2021-05-25 15:40:57 +08:00
lyswhut
7fa3baacfd 更新依赖 2021-05-25 15:40:07 +08:00
lyswhut
f94c1ef852 不允许播放空列表 2021-05-24 11:03:21 +08:00
lyswhut
cc4cb1a6a7 修复企鹅音乐搜索歌曲没有结果的问题 2021-05-23 16:31:31 +08:00
lyswhut
247a322366 修复播放在空的歌单列表点击播放全部时报错的问题 2021-05-23 16:31:26 +08:00
lyswhut
7ec7023d1b Merge branch 'dev' 2021-05-20 08:28:13 +08:00
lyswhut
b4edd95bab 移除多余选项 2021-05-20 08:22:44 +08:00
lyswhut
50ddc8caa3 去除多余选项 2021-05-20 01:16:44 +08:00
lyswhut
6263dbbd0f Merge branch 'dev' 2021-05-20 00:14:56 +08:00
lyswhut
64c45daf16 修改安装包构建顺序,使latest.yml仍指向x86_64版本的包 2021-05-20 00:14:36 +08:00
lyswhut
5ed41cb5ac Merge branch 'dev' 2021-05-19 21:19:05 +08:00
lyswhut
29dea5f829 添加win x64与x86版本安装包的单独构建 2021-05-19 21:17:27 +08:00
lyswhut
e51b21421d Merge branch 'dev' 2021-05-19 18:28:10 +08:00
lyswhut
5cae4ae0bf 使用更新的node版本 2021-05-19 18:27:48 +08:00
lyswhut
5f2cbb30c2 Merge branch 'dev' 2021-05-19 18:21:49 +08:00
lyswhut
1ddec2cb69 发布v1.10.0 2021-05-19 18:21:16 +08:00
lyswhut
96b54cc77a 稍微加高进度条 2021-05-19 18:15:41 +08:00
lyswhut
4da6524493 修复了一个歌曲下载失败时不会跳过任务的问题 2021-05-19 18:15:04 +08:00
lyswhut
1364d58065 新增Mac arm64位dmg包的构建 2021-05-19 16:55:02 +08:00
lyswhut
4383966051 更新依赖 2021-05-19 11:15:36 +08:00
lyswhut
86451fb5d0 更新依赖 2021-05-17 16:47:09 +08:00
lyswhut
0878c7398d 排行榜界面添加播放、收藏整个排行榜功能 2021-05-17 15:43:47 +08:00
lyswhut
81643165c2 修复在线列表的请求取消问题 2021-05-16 22:46:46 +08:00
lyswhut
b37802949c 更新依赖 2021-05-16 14:12:11 +08:00
lyswhut
a53f2388b4 更新网盘地址 2021-05-16 14:09:03 +08:00
lyswhut
e823543cad 更新 2021-05-15 20:40:01 +08:00
lyswhut
bdf7f903e9 修复mg源歌单标签、排行榜歌曲列表无法加载的问题 2021-05-15 20:39:53 +08:00
lyswhut
336b40a102 修复wy源的歌曲音质匹配问题 2021-05-15 17:27:25 +08:00
lyswhut
354922195f 修复请求重试bug 2021-05-15 01:42:23 +08:00
lyswhut
9c1199fc48 更新FAQ 2021-05-12 17:20:38 +08:00
lyswhut
ea35ed25d8 修复kw部分歌单无法打开的问题 2021-05-12 14:04:08 +08:00
lyswhut
add05ef913 修复在当前正常播放的列表中使用稍后播放功能时,播放完后稍后播放的歌曲后不会恢复原来播放位置播放的问题 2021-05-10 16:35:34 +08:00
lyswhut
e3aa4110fc 更新依赖 2021-05-09 13:33:46 +08:00
lyswhut
8a0ed1bc13 更新说明 2021-05-03 12:41:03 +08:00
lyswhut
0db490d444 更新依赖 2021-04-30 21:22:50 +08:00
lyswhut
4fd89c8a83 修正错别字 2021-04-28 17:47:33 +08:00
lyswhut
4fe17e556e 修复快捷键设置框内的提示问题 2021-04-26 15:17:01 +08:00
lyswhut
e95553163c 修复全局快捷键对桌面歌词无效的问题 2021-04-26 14:13:11 +08:00
lyswhut
8ae72074ef 更新 2021-04-25 13:18:49 +08:00
lyswhut
b6c1403f4b 显示换源提示 2021-04-25 10:29:08 +08:00
lyswhut
920d696d0b 更新歌曲无法下载、播放说明 2021-04-24 17:22:45 +08:00
lyswhut
a8dcb0b973 优化逻辑 2021-04-24 17:22:28 +08:00
lyswhut
895198b7b8 修正描述 2021-04-24 16:10:22 +08:00
lyswhut
144941d991 Merge branch 'dev' 2021-04-24 15:55:49 +08:00
lyswhut
f203517ce8 发布1.9.0版本 2021-04-24 15:55:40 +08:00
lyswhut
6dd6741237 Merge branch 'dev' 2021-04-24 15:53:37 +08:00
lyswhut
066e9c2fd5 修复上传包名匹配 2021-04-24 15:38:02 +08:00
lyswhut
f500b9b2d5 优化beta打包流程 2021-04-24 15:13:10 +08:00
lyswhut
c80e35872e 修改打包名 2021-04-24 14:34:52 +08:00
lyswhut
05eda6e406 修复打包失败 2021-04-24 14:13:13 +08:00
lyswhut
1686182616 更新版本号 2021-04-24 13:50:34 +08:00
lyswhut
fd5720451e 更新依赖 2021-04-24 13:48:27 +08:00
lyswhut
5b9adc8daa 修复属性计算 2021-04-23 10:57:47 +08:00
lyswhut
3efd6867d8 新增自动换源下载功能 2021-04-22 16:01:47 +08:00
lyswhut
cd1a55652f 修复换源错误的处理 2021-04-18 15:06:21 +08:00
lyswhut
47d0a4a343 修复正在播放“稍后播放”的歌曲时,对“稍后播放”前播放的列表进行添加、删除操作会导致切歌的问题 2021-04-16 16:58:20 +08:00
lyswhut
fe76d103f0 更新依赖 2021-04-16 14:18:53 +08:00
lyswhut
789a9bfe1a 更新依赖 2021-04-15 09:21:35 +08:00
lyswhut
391f97d3bb 修复js加载顺序问题 2021-04-14 16:11:57 +08:00
lyswhut
d077a03e60 优化配色 2021-04-14 15:38:59 +08:00
lyswhut
3317b6a9e5 优化配色 2021-04-14 15:01:55 +08:00
lyswhut
0b0f0e4649 新增黑色皮肤“黑纸白字” 2021-04-14 14:46:57 +08:00
lyswhut
f75e416479 添加黑色皮肤 2021-04-14 13:33:36 +08:00
lyswhut
d83db6bdf5 Merge branch 'dev' into 黑色主题 2021-04-14 08:35:00 +08:00
lyswhut
92ec461a77 修正设置页“搜索设置”部分内容的缩进显示问题 2021-04-13 15:57:25 +08:00
lyswhut
144fe3b8ac 更新依赖 2021-04-10 20:43:20 +08:00
lyswhut
af2e650538 兼容打开咪咕移动端分享的歌单链接,添加打开歌单的信息显示 2021-04-06 15:39:16 +08:00
lyswhut
1c585dc479 分离歌曲URL的缓存 2021-04-05 19:31:07 +08:00
lyswhut
c6853b197c 修复列表清除Bug 2021-04-03 21:31:19 +08:00
lyswhut
ef591c883a 移除列表lrc存储 2021-04-03 21:17:27 +08:00
lyswhut
4918db9cb1 分离歌词与歌曲列表信息的保存 2021-04-03 20:26:28 +08:00
lyswhut
b8250b67c9 升级到 webpack 5 2021-04-03 13:58:10 +08:00
lyswhut
d6f87894aa 更新依赖 2021-04-03 13:12:11 +08:00
lyswhut
c808500083 新增Windows arm64位免安装版的构建 2021-03-31 08:54:47 +08:00
lyswhut
3a6c2be48a 更新依赖 2021-03-29 08:54:55 +08:00
lyswhut
a28d01704a 更新faq 2021-03-27 19:34:45 +08:00
lyswhut
8bed654756 修复聚合搜索总页计算问题 2021-03-24 11:06:18 +08:00
lyswhut
8845884b24 更新发布流程 2021-03-21 13:23:13 +08:00
lyswhut
ea5de9a289 优化歌曲自动换源匹配 2021-03-20 20:55:44 +08:00
lyswhut
7922920f51 修改默认每页条数 2021-03-20 20:19:04 +08:00
lyswhut
dcf6ab0792 清理列表缓存将同时清理歌词 2021-03-20 19:52:02 +08:00
lyswhut
57fe510138 更新网盘链接 2021-03-20 00:10:36 +08:00
lyswhut
b4c7a6e448 自动禁用空代理 2021-03-18 17:30:44 +08:00
lyswhut
1d8702e95f 添加路径提示支持 2021-03-16 11:01:57 +08:00
lyswhut
8171fcd346 序启动时对数据文件做读取校验,数据出现损坏时自动备份损坏的数据 2021-03-14 02:06:35 +08:00
lyswhut
b1ccdeb0d3 修正错误 2021-03-13 16:49:05 +08:00
lyswhut
969b03b364 略微减小翻译字体大小 2021-03-13 15:25:35 +08:00
lyswhut
5ed81132fb 优化错误处理 2021-03-13 14:35:20 +08:00
lyswhut
c663cdbe0d 分离store逻辑 2021-03-13 14:10:36 +08:00
lyswhut
a4d46fd501 修正描述 2021-03-12 22:49:27 +08:00
lyswhut
c3e1ead90a Merge branch 'dhmkh' into dev 2021-03-12 22:42:17 +08:00
lyswhut
92c10eb534 修改协议阅读时间 2021-03-12 16:30:27 +08:00
lyswhut
08d0758616 修复备份与恢复功能在恢复数据时某些设置不立即生效的问题 2021-03-12 16:22:22 +08:00
lyswhut
68d8369a8b 修正单词拼写错误 2021-03-12 09:02:40 +08:00
lyswhut
af59a4472a 调整翻译字体大小 2021-03-11 17:34:29 +08:00
lyswhut
269546add1 Merge branch 'dev' 2021-03-10 10:23:50 +08:00
lyswhut
65246f8856 修正beta打包规则 2021-03-10 10:22:19 +08:00
lyswhut
ab35fe793d Merge branch 'dev' 2021-03-10 10:20:34 +08:00
lyswhut
e7b897e67c 优化打包命令 2021-03-10 10:19:49 +08:00
lyswhut
0b5dbb464d Merge branch 'dev' 2021-03-10 09:36:04 +08:00
lyswhut
60419f4319 修正徽章地址 2021-03-10 09:35:48 +08:00
lyswhut
1ddf0db18d 重命名beta打包工作流文件名 2021-03-10 09:34:43 +08:00
lyswhut
0732ca37b8 优化打包规则 2021-03-10 09:33:04 +08:00
lyswhut
801ea899e6 迁移到GitHub Actions 2021-03-10 09:21:43 +08:00
lyswhut
ba5159d2ad 修复Linux构建错误 2021-03-10 01:39:08 +08:00
lyswhut
ab2cf5a50f 修正错误,添加dev构建 2021-03-10 01:34:58 +08:00
lyswhut
d533c12315 修复Linux配置 2021-03-10 01:24:28 +08:00
lyswhut
1d90719053 Merge branch 'dev' 2021-03-10 01:18:49 +08:00
lyswhut
127d279266 修正语法错误 2021-03-10 01:15:30 +08:00
lyswhut
a484f66e69 修正语法错误 2021-03-10 01:02:30 +08:00
lyswhut
b34924e264 Merge branch 'dev' 2021-03-10 00:59:36 +08:00
lyswhut
4d5494c256 更新文件夹名 2021-03-10 00:59:06 +08:00
lyswhut
46b094a57a Merge branch 'dev' 2021-03-10 00:51:44 +08:00
lyswhut
0ef89c30e3 更新更新日志 2021-03-10 00:50:55 +08:00
lyswhut
dc2a89ce3f Merge branch 'dev' 2021-03-10 00:47:42 +08:00
lyswhut
47adcfec30 添加缓存 2021-03-10 00:42:27 +08:00
lyswhut
25e848702f 更新依赖 2021-03-10 00:42:15 +08:00
lyswhut
756a285978 修复收藏的在线列表id迁移保存出错的问题 2021-03-10 00:41:38 +08:00
lyswhut
fcf79bda03 Merge branch 'dev' 2021-03-09 22:55:20 +08:00
lyswhut
6b170f3116 尝试迁移到GitHub Actions 2021-03-09 22:50:08 +08:00
lyswhut
ea6bc245ff Merge branch 'dev' 2021-03-09 20:50:50 +08:00
lyswhut
61dc344d89 发布v1.8.2 2021-03-09 20:49:49 +08:00
lyswhut
fa6b7eacaa 修复歌曲ID存储变更导致酷狗图片获取失败的问题 2021-03-09 17:40:33 +08:00
lyswhut
23dafe539d 修正错误 2021-03-08 19:20:49 +08:00
lyswhut
0a654efda0 修改api窗口名 2021-03-07 21:43:00 +08:00
lyswhut
bec10ebe34 Merge branch 'dev' 2021-03-07 17:56:13 +08:00
lyswhut
0e03ca5d48 发布v1.8.1 2021-03-07 17:55:04 +08:00
lyswhut
4b1bf29ea0 新增启动参数-dhmkh 2021-03-07 17:54:02 +08:00
lyswhut
b391b2c16d 添加链接锚点 2021-03-07 17:53:24 +08:00
lyswhut
7b9cf93b40 修复歌词翻译的主题颜色适配问题 2021-03-07 15:07:22 +08:00
lyswhut
dd55e5e086 修改api窗口名 2021-03-07 13:30:47 +08:00
lyswhut
ba2b1dac92 Merge branch 'dev' 2021-03-07 12:38:11 +08:00
lyswhut
56ffeb3008 发布v1.8.0 2021-03-07 12:36:57 +08:00
lyswhut
b3757fd6b5 修复在下载列表右击未下载完成的歌曲弹出的右击菜单中没有开始下载选项的问题 2021-03-07 12:22:53 +08:00
lyswhut
e0de81230e Merge branch 'api' into dev 2021-03-07 12:01:59 +08:00
lyswhut
2bc669c828 添加更新日志 2021-03-07 01:29:23 +08:00
lyswhut
493f7809a4 优化歌词特殊字符移除 2021-03-07 01:22:25 +08:00
lyswhut
ef52cd6991 Merge branch 'dev' into lrc 2021-03-07 01:18:54 +08:00
lyswhut
480f15b6f6 优化酷狗搜索结果 2021-03-07 01:18:44 +08:00
lyswhut
fcfee88ef4 移除日志打印 2021-03-07 00:56:00 +08:00
lyswhut
19f647e6ab Merge branch 'dev' into lrc 2021-03-04 15:27:45 +08:00
lyswhut
27e5ec02f4 优化单首歌曲的“添加到列表”弹窗歌曲列表状态的显示 2021-03-04 15:27:29 +08:00
lyswhut
0808d77a2d 修复鼠标显示状态 2021-03-04 14:33:23 +08:00
lyswhut
90d9e9b911 修复歌词缩放设置失效的问题 2021-03-04 13:20:19 +08:00
lyswhut
ebfbc11c20 Merge branch 'dev' into lrc 2021-03-03 17:21:13 +08:00
lyswhut
2764743062 更新说明 2021-03-03 16:52:19 +08:00
lyswhut
c66d7d6187 完善歌词 2021-03-03 16:51:02 +08:00
lyswhut
f2b6c0a443 支持桌面歌词拖动 2021-03-02 18:41:27 +08:00
lyswhut
aef0ffa506 修改桌面歌词为逐字播放 2021-03-02 18:10:12 +08:00
lyswhut
040fcfba4f 初步完善歌词 2021-03-02 08:32:26 +08:00
lyswhut
9f72831e4a 更新依赖 2021-02-23 19:51:01 +08:00
lyswhut
fa0d9ad4c3 新增启动参数-play 2021-02-22 12:59:39 +08:00
lyswhut
b6107b7281 优化列表存储逻辑 2021-02-21 16:19:08 +08:00
lyswhut
6ffe61562b 移除自动换源清理 2021-02-21 15:46:19 +08:00
lyswhut
b5f5e13f22 移除xm verify窗口 2021-02-21 12:34:50 +08:00
lyswhut
376b7545e1 修复我的列表的灰色歌曲会显示下载按钮的问题 2021-02-20 01:01:58 +08:00
lyswhut
ffaa3e591b 修复kg获取图片失败的错误处理 2021-02-20 00:50:00 +08:00
lyswhut
24d5722ef7 移除log 2021-02-19 22:10:37 +08:00
lyswhut
9e1fe0a6c1 移除多余代码 2021-02-19 21:59:58 +08:00
lyswhut
d128aeb6ef 修复kg歌曲详情页的歌曲无法播放的问题 2021-02-19 11:47:25 +08:00
lyswhut
ef371dedb4 修正描述 2021-02-15 19:53:46 +08:00
lyswhut
00d262f0e6 修复mg源歌单列表无法加载的问题 2021-02-15 12:40:12 +08:00
lyswhut
475b8924c3 修复歌单列表加载失败时无法进入歌单打开界面的问题 2021-02-15 10:52:29 +08:00
lyswhut
0afb1417a3 修复下载列表数据存储问题 2021-02-06 00:09:09 +08:00
lyswhut
b6b41660d6 移除未使用的变量 2021-02-05 23:07:36 +08:00
lyswhut
c78811fe36 移除虾米源,允许播放除了搜索列表以外的所有歌曲 2021-02-05 23:06:08 +08:00
lyswhut
a0254eb4f2 优化英文名歌曲匹配 2021-02-04 17:26:11 +08:00
lyswhut
e9c96ecde2 修复搜索列表双击不支持播放的源时会导致切歌的问题 2021-02-04 14:37:52 +08:00
lyswhut
f9cbf9254c 新增设置-其他-列表缓存信息清理功能 2021-02-02 15:08:07 +08:00
lyswhut
70d24ffdfd 修复音乐搜索列表的稍后播放功能无效的问题 2021-02-01 18:26:26 +08:00
lyswhut
84530ca0a2 添加网盘无法打开的提示 2021-02-01 16:17:57 +08:00
lyswhut
e848fda4e3 将下载列表与我的列表分离存储 2021-02-01 14:55:39 +08:00
lyswhut
51964e51c6 Merge branch 'dev' 2021-01-30 14:33:58 +08:00
lyswhut
0c63268df1 发布v1.7.1版本 2021-01-30 14:30:05 +08:00
lyswhut
316f62c3c8 修复MAC下xm音乐滑块验证问题 2021-01-30 14:29:20 +08:00
lyswhut
9e37800426 修复非透明模式下右侧滚动条无法拖动的问题 2021-01-30 14:18:12 +08:00
lyswhut
3e0ee374c9 移除对changelog的html对version.json的写入 2021-01-30 13:46:46 +08:00
lyswhut
7b7711d410 Merge branch 'dev' into 黑色主题 2021-01-09 20:32:55 +08:00
lyswhut
3b00efdeae Merge branch 'dev' into 黑色主题 2020-12-24 17:22:30 +08:00
lyswhut
0a0d6969ec 初始提交 2020-11-14 11:48:51 +08:00
438 changed files with 29753 additions and 20543 deletions

View File

@@ -1,21 +0,0 @@
platform:
- x64
cache:
- node_modules
- '%APPDATA%\npm-cache'
- '%LOCALAPPDATA%\electron\Cache'
- '%LOCALAPPDATA%\electron-builder\Cache'
install:
- ps: Install-Product node 12 x64
- npm install
build_script:
- npm run publish:gh
test: off
branches:
only:
- master

View File

@@ -19,6 +19,7 @@
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-modules-umd",
"@babel/plugin-transform-runtime"
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties"
]
}

View File

@@ -1,5 +1,8 @@
{
"extends": "standard",
"extends": [
// "plugin:vue/vue3-recommended",
"standard"
],
"plugins": [
"html"
],
@@ -16,9 +19,13 @@
"no-multiple-empty-lines": [1, {"max": 2}],
"comma-dangle": [2, "always-multiline"],
"standard/no-callback-literal": "off",
"prefer-const": "off"
"prefer-const": "off",
"no-labels": "off",
"node/no-callback-literal": "off",
"vue/multi-word-component-names": "off"
},
"settings": {
"html/html-extensions": [".html", ".vue"]
}
},
"ignorePatterns": ["vendors", "*.min.js"]
}

View File

@@ -1,25 +0,0 @@
---
name: 功能请求(请先查看常见问题及搜索issue列表中有无你要提的问题)
about: 为这个项目提出一个想法
title: 例如添加xxx功能、优化xxx功能
labels: ''
assignees: ''
---
**解决方案检查**
<!-- 请确保你已从以下渠道寻找过解决方案,然后将 [ ] 替换成 [x] -->
- [ ] 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>)
- [ ] 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>)
**描述您想要的解决方案**
<!-- 简洁明了地描述您要发生的事情。 -->
**描述您考虑过的替代方案**
<!-- 对您考虑过的所有替代解决方案或功能的简洁明了的描述。 -->
**其他内容**
<!-- 在此处添加有关功能请求的任何其他上下文或屏幕截图(直接把图片拖到编辑框即可添加图片)。 -->

40
.github/ISSUE_TEMPLATE/----.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: ✨功能请求
description: 为这个项目提出一个想法请先查看常见问题及搜索issue列表中有无你要提的问题
title: "[Feature]: "
body:
- type: checkboxes
id: check-answer
attributes:
label: 解决方案检查
description: 请确保你已完成以下所有操作
options:
- label: 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>),但没有找到解决方案
required: true
- 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: 描述你想要的解决方案
description: 简洁明了地描述你要发生的事情
validations:
required: true
- type: textarea
id: alternatives-considered
attributes:
label: 描述你考虑过的替代方案
description: 对你考虑过的所有替代解决方案或功能的简洁明了的描述
validations:
required: false
- type: textarea
id: additional-information
attributes:
label: 附加信息
description: 如果你的问题需要进一步解释,或者想要表达其他内容,请在此处添加更多信息。(直接把图片、视频拖到编辑框即可添加图片或视频)

View File

@@ -1,42 +0,0 @@
---
name: 报告Bug(请先查看常见问题及搜索issue列表中有无你要提的问题)
about: 创建报告以帮助我们改进
title: 例如:音乐无法播放
labels: ''
assignees: ''
---
**解决方案检查**
<!-- 请确保你已从以下渠道寻找过解决方案,然后将 [ ] 替换成 [x] -->
- [ ] 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>)
- [ ] 我已搜索issue列表(<https://github.com/lyswhut/lx-music-desktop/issues?utf8=✓&q=>)
**描述错误**
<!-- 清楚简洁地说明错误是什么。 -->
**重现**
重现行为的步骤:
1.转到“ ...”
2.点击“ ....”
3.向下滚动到“ ....”
4.看到错误
**预期行为**
<!-- 对您期望发生的事情的简洁明了的描述。 -->
**截图**
<!-- 如果适用,请添加屏幕截图以帮助解释您的问题(直接把图片拖到编辑框即可添加图片)。 -->
**环境:**
  -操作系统及版本:[例如Windows 10 64位 18362.156]
  -软件安装包及版本:[例如1.0.0 安装版]
**其他内容**
<!-- 在此处添加有关该问题的任何其他上下文。 -->

55
.github/ISSUE_TEMPLATE/--bug.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: 🐞报告Bug
description: 报告bug请先查看常见问题及搜索issue列表中有无你要提的问题
title: "[Bug]: "
body:
- type: checkboxes
id: check-answer
attributes:
label: 解决方案检查
description: 请确保你已完成以下所有操作
options:
- label: 我已阅读常见问题(<https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md>),并没有找到解决方案
required: true
- 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
placeholder: 1.15.0
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
placeholder: "例如 Windows 10 版本 1909、macOS Catalina 10.15.7 或 Ubuntu 20.04"
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: 附加信息
description: 如果你的问题需要进一步解释,或者你所遇到的问题不容易重现,请在此处添加更多信息。(直接把图片、视频拖到编辑框即可添加图片或视频)

233
.github/workflows/beta-pack.yml vendored Normal file
View File

@@ -0,0 +1,233 @@
name: Build Beta
on:
push:
branches:
- beta
jobs:
Windows:
name: Windows
runs-on: windows-latest
steps:
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
%APPDATA%\npm-cache
%LOCALAPPDATA%\electron\Cache
%LOCALAPPDATA%\electron-builder\Cache
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Build Package Setup x64
run: npm run pack:win:setup:x64
- name: Upload Artifact Setup x64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x64-Setup
path: build/* x64 Setup.exe
- name: Build Package Setup x86
run: npm run pack:win:setup:x86
- name: Upload Artifact Setup x86
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x86-Setup
path: build/* x86 Setup.exe
- name: Build Package Setup arm64
run: npm run pack:win:setup:arm64
- name: Upload Artifact Setup arm64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-arm64-Setup
path: build/* arm64 Setup.exe
- name: Build Package Setup x86_64
run: npm run pack:win:setup:x86_64
- name: Upload Artifact Setup x86_64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x86_64-Setup
path: build/*x86_64 Setup.exe
- name: Build Package 7z x64
run: npm run pack:win:7z:x64
- name: Upload Artifact 7z x64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-win_x64-green
path: build/*win_x64 green.7z
- name: Build Package 7z x86
run: npm run pack:win:7z:x86
- name: Upload Artifact 7z x86
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-win_x86-green
path: build/*win_x86 green.7z
- name: Build Package 7z arm64
run: npm run pack:win:7z:arm64
- name: Upload Artifact 7z arm64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-win_arm64-green
path: build/*win_arm64 green.7z
Mac:
name: Mac
runs-on: macos-latest
steps:
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Build Package dmg
run: |
npm run pack:mac:dmg
npm run pack:mac:dmg:arm64
env:
ELECTRON_CACHE: $HOME/.cache/electron
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
- name: Upload Artifact dmg
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-mac-dmg
path: |
build/*.dmg
!build/*-arm64.dmg
- name: Upload Artifact dmg
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-mac-dmg-arm64
path: build/*-arm64.dmg
Linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Install package
run: sudo apt-get install -y rpm libarchive-tools
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Build Package deb x64
run: npm run pack:linux:deb:x64
- name: Upload Artifact deb x64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-deb-x64
path: build/* x64.deb
- name: Build Package deb x86
run: npm run pack:linux:deb:x86
- name: Upload Artifact deb x86
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-deb-x86
path: build/* x86.deb
- name: Build Package deb arm64
run: npm run pack:linux:deb:arm64
- name: Upload Artifact deb arm64
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-deb-arm64
path: build/* arm64.deb
- name: Build Package deb armv7l
run: npm run pack:linux:deb:armv7l
- name: Upload Artifact deb armv7l
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-deb-armv7l
path: build/* armv7l.deb
- name: Build Package x64 appImage
run: npm run pack:linux:appImage
- name: Upload Artifact x64 appImage
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x64-appImage
path: build/* x64.AppImage
- name: Build Package x64 rpm
run: npm run pack:linux:rpm
- name: Upload Artifact x64 rpm
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x64-rpm
path: build/* x64.rpm
- name: Build Package x64 pacman
run: npm run pack:linux:pacman
- name: Upload Artifact x64 pacman
uses: actions/upload-artifact@v2
with:
name: lx-music-desktop-x64-pacman
path: build/* x64.pacman

136
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,136 @@
name: Build
on:
push:
branches:
- master
jobs:
Windows:
name: Windows
runs-on: windows-latest
steps:
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
%APPDATA%\npm-cache
%LOCALAPPDATA%\electron\Cache
%LOCALAPPDATA%\electron-builder\Cache
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Release package
run: |
npm run publish:win:setup:x64:always
npm run publish:win:setup:x86
npm run publish:win:setup:arm64
npm run publish:win:setup:x86_64
npm run publish:win:7z:x64
npm run publish:win:7z:x86
npm run publish:win:7z:arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
Mac:
name: Mac
runs-on: macos-latest
steps:
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Release package
run: |
npm run publish:mac:dmg:always
npm run publish:mac:dmg:arm64
env:
ELECTRON_CACHE: $HOME/.cache/electron
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
Linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Install package
run: sudo apt-get install -y rpm libarchive-tools
- name: Check out git repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache file
uses: actions/cache@v2
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: npm install
- name: Build src code
run: npm run build:src
- name: Release package
run: |
npm run publish:linux:deb:x64:always
npm run publish:linux:deb:x86
npm run publish:linux:deb:arm64
npm run publish:linux:deb:armv7l
npm run publish:linux:appImage
npm run publish:linux:rpm
npm run publish:linux:pacman
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}

12
.ncurc.js Normal file
View File

@@ -0,0 +1,12 @@
module.exports = {
// upgrade: true,
// target: 'newest',
reject: [
'webpack-dev-server',
'eslint',
'electron',
'electron-builder',
'chalk',
// 'eslint-config-standard'
]
}

View File

@@ -1,49 +0,0 @@
language: node_js
node_js: 12
matrix:
include:
- os: osx
osx_image: xcode10.2
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
dist: trusty
sudo: required
addons:
apt:
packages:
- rpm
- bsdtar
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
notifications:
email: false
script:
- node --version
- npm --version
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
npm install && npm run publish:gh:linux
else
npm run publish:gh:mac
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
# only run this script on pull requests and merges into
# the 'master' and 'prod' branches
branches:
only:
- master
- dev

14
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"i18n-ally.localesPaths": [
"src/lang"
],
// "i18n-ally.fullReloadOnChanged": true,
"i18n-ally.keystyle": "nested",
"i18n-ally.displayLanguage": "zh-cn",
"i18n-ally.sourceLanguage": "zh-cn",
"i18n-ally.translate.engines": [
"google-cn",
"google"
],
"i18n-ally.sortKeys": true
}

View File

@@ -6,6 +6,330 @@ 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.16.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.15.3...v1.16.0) - 2022-01-01
这算是一个大版本,对主窗口部分的代码逻辑做了较大改动,但由于界面的改动不大,所以没有更新大版本号。
虽然经过一个月的测试与问题修复,但可能仍然存在未发现的问题,若你发现某些界面异常、某些行为与旧版本存在差异等问题,欢迎反馈!
另外祝大家元旦快乐~
### 新增
- 播放详情页新增音量控制条
- 播放详情页新增桌面歌词切换按钮
- 新增将我的列表保存为TXT、CSV格式可以去设置-备份与恢复中使用注意此类格式的备份目前不支持恢复到LX Music中
- 新增根据歌曲名、歌手名等字段对列表自动排序的功能,可以在我的列表右击列表名弹出的菜单中使用
- 新增将播放与下载的歌词转换为繁体中文选项,默认关闭,可在设置-播放设置中开启
- 现在已允许进入临时播放列表,即:使用歌单详情页、排行榜名称右键菜单的“播放”按钮播放歌曲时,可右击播放封面进入此临时列表
- 播放详情页新增音频可视化功能(实验性)
- 我的列表新增拖动调整位置功能按住Ctrl键Mac上对应Command键的时候将进入“拖动模式”此时可以拖动列表的位置来调整顺序
### 优化
- 优化列表性能,软件整体性能
- 调整Mac平台下的图标大小
- 同步功能添加对列表顺序调整的控制,确保手动调整位置后的列表与不同的电脑同步时,列表位置不会被还原
- 优化歌单详情、排行榜名右键的播放按钮的播放机制,现在不用等待整个列表(多页时)加载完成才能播放了
- 为播放详情页、桌面歌词添加延迟滚动,播放详情页略微减小已激活歌词的缩放大小及桌面歌词翻译大小
- 修改右边控制按钮为windows风格
- 更新了新年皮肤的背景与配色,欢迎体验~
### 修复
- 修复kw源某些歌曲的歌词提取异常的问题
### 变更
- 现在使用繁体中文语言时将不再自动转换歌词,转换行为将由上面新增的转换开关控制
### 移除
- 移除我的列表右键菜单的“上移、下移列表”功能,调整改用新增的拖动功能去调整位置
### 其他
- 升级vue到 3.x
## [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
### 其他
- 降级electron到v13.4.0这修复了windows 7下播放歌曲时软件会崩溃的问题
## [1.15.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.15.0...v1.15.1) - 2021-11-09
### 优化
- 优化我的列表、下载列表等列表的滚动流畅度
- 优化下载功能的批量添加、删除、暂停任务时的流畅度,现在进行这些操作应该不会再觉得卡顿了
- 支持启动软件时恢复播放下载列表里的歌曲
- 添加媒体播放进度条的信息设置
### 修复
- 修复某些情况下获取URL失败时会意外切歌的问题
- 修复了某些情况下会列表同步失败,导致连接断开无限重连或一直卡在 `syncing...` 的问题
- 修复列表数据过大导致同步失败的问题
### 其他
- 更新electron到v15.3.1(这修复了媒体控制失效的问题)
## [1.15.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.14.1...v1.15.0) - 2021-10-29
### 新增
- 添加黑色托盘图标
- 自定义源新增`version`字段,新增`utils.buffer.bufToString`方法
### 优化
- 大幅优化我的列表、下载、歌单、排行榜列表性能,现在即使同一列表内的歌曲很多时也不会卡顿了
- 优化列表同步代码逻辑
- 优化开关评论时的动画性能
- 优化进入、离开播放详情页的性能
- 兼容桌面歌词以触摸的方式移动、调整大小
- 调整图标尺寸
### 修复
- 修复kg源的歌单链接无法打开的问题
- 修复同一首歌的URL、歌词等同时需要换源时的处理问题
### 其他
- 更新 Electron 到 v15.3.0
## [1.14.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.14.0...v1.14.1) - 2021-10-04
### 修复
- 修复我的列表搜索无法搜索小括号、中括号等字符的问题
- 修复v1.14.0出现的备份与恢复功能备份的数据无法恢复的问题同时兼容使用v1.14.0导出的存在问题的数据
## [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
注意:测试版的功可能会不稳定,打算潜水的勿加。
### 新增
- 歌曲搜索框新增清理按钮,点击此按钮可以清理搜索框并返回初始搜索界面
- 新增“下载的歌词文件编码格式”设置,默认下载的歌词编码仍是`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`
- 软件内快捷键的最小化触发时,如果已启用托盘,则隐藏程序,否则最小化程序
### 修复
- 修复某些情况下同步功能会导致切歌混乱的问题
- 修复从电脑浏览器复制的企鹅歌单链接无法打开的问题
## [1.12.2](https://github.com/lyswhut/lx-music-desktop/compare/v1.12.1...v1.12.2) - 2021-08-11
### 修复
- 修复播放下载列表的歌曲时切歌的问题
- 修复播放下载列表的歌曲时歌词无法显示的问题
- 修复下载列表稍后播放功能无效的问题
- 修复同步服务器启动失败时,关闭同步服务不会清空失败信息的问题
## [1.12.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.12.0...v1.12.1) - 2021-08-08
### 修复
- 修复随机播放下无法切歌的问题
## [1.12.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.11.0...v1.12.0) - 2021-08-08
### 新增
- 新增局域网同步功能实验性首次使用前建议先备份一次列表此功能需要配合PC端使用移动端与PC端处在同一个局域网路由器的网络下时可以多端实时同步歌曲列表使用问题请看"常见问题"。
### 优化
- 添加播放器对系统媒体控制与显示的兼容处理现在在windows下的锁屏界面可以正确显示当前播放的音乐信息及切换歌曲了
### 修复
- 修复导入kg歌单最多只能加载100、500首歌曲的问题。注现在可以加载1000+首歌曲的歌单但出于未知原因会导致部分歌曲无法加载可能是无版权导致的目前酷狗码仍然最多只能加载500首歌
- 修复某些情况下所显示的歌词、封面图片与当前正在播放的歌曲不一致的问题
## [1.11.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.10.2...v1.11.0) - 2021-07-18
### 新增
- 添加 win arm64 架构的安装包构建
- 新增“添加歌曲到列表时的位置”设置,可选项为列表的“顶部”与“底部”
### 优化
- 优化网络请求,尝试去解决无法连接服务器的问题
- 优化mg源打开歌单的链接兼容
### 修复
- 修复mg源搜索失效的问题
### 移除
- 因wy源的歌单列表已没有“最新”排序的选项所以现跟随移除wy源歌单列表按“最新”排序的按钮
### 变更
- 添加歌曲到列表时从原来的底部改为顶部,若你想要将你的列表歌曲顺序反转以适应这一变更,可先按住`shift`键的情况下点击列表的最后一首歌然后再点击列表的第一首歌完成倒序选中最后随便右击列表的任意一首歌在弹出的菜单中选择调整顺序在弹出框输入1后确定即可反转列表。
若你想要恢复原来的行为则可以去更改“添加歌曲到列表时的位置”设置项。
### 其他
- 更新electron到v13.1.7
## [1.10.2](https://github.com/lyswhut/lx-music-desktop/compare/v1.10.1...v1.10.2) - 2021-05-25
### 修复
- 修复企鹅音乐搜索歌曲没有结果的问题
## [1.10.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.10.0...v1.10.1) - 2021-05-25
### 修复
- 修复企鹅音乐搜索歌曲没有结果的问题
- 修复播放在空的歌单列表点击播放全部时报错的问题
## [1.10.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.9.0...v1.10.0) - 2021-05-19
lx music移动端已经发布了使用习惯仍跟桌面版一样不过功能、界面仍比较简单有兴趣的可以去体检一下项目地址
https://github.com/lyswhut/lx-music-mobile#readme
### 新增
- 排行榜界面添加播放、收藏整个排行榜功能,可以右击排行榜名字后,在弹出的右键菜单中使用。注:收藏、播放存在分页的排行榜时需等待操作完成后才能切换排行榜,不然会导致操作中断。
- 新增Mac arm64位dmg包的构建
### 修复
- 修复全局快捷键对桌面歌词无效的问题
- 修复快捷键设置框内的提示问题
- 修复在当前正常播放的列表中使用稍后播放功能时,播放完后稍后播放的歌曲后不会恢复原来播放位置播放的问题
- 修复kw部分歌单无法打开的问题
- 修复wy源的歌曲音质匹配问题
- 修复mg源歌单标签、排行榜歌曲列表无法加载的问题
- 修复了一个歌曲下载失败时不会跳过任务的问题
### 其他
- 更新 Electron 到 12.0.8
## [1.9.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.8.2...v1.9.0) - 2021-04-24
### 新增
- 新增启动参数`-dhmkh`此参数将禁用Chromium的Hardware Media Key Handling特性用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题
- 新增Windows arm64位免安装版的构建
- 新增黑色皮肤“黑灯瞎火”,有关于皮肤配色的建议欢迎反馈
- 新增自动换源下载功能默认关闭当无法从歌曲的原始源下载时将尝试切换到其他源下载此功能不100%保证换源后的歌曲版本与原版一致
### 优化
- 程序启动时对数据文件做读取校验数据出现损坏时自动备份损坏的数据若出现数据读取错误的弹窗并出现我的列表丢失时可到GitHub或加群反馈
- 当设置-代理启用,但主机地址为空的时,将不再使用代理配置进行网络连接,并且在离开设置界面时自动禁用代理
- 优化歌曲自动换源匹配
- 分离歌词与歌曲列表信息的保存,以减小列表列表文件损坏的几率
- 兼容打开咪咕移动端分享的歌单链接,添加打开歌单的信息显示
### 修复
- 修复备份与恢复功能在恢复数据时某些设置不立即生效的问题
- 修正设置页“搜索设置”部分内容的缩进显示问题
- 修复正在播放“稍后播放”的歌曲时,对“稍后播放”前播放的列表进行添加、删除操作会导致切歌的问题
## [1.8.2](https://github.com/lyswhut/lx-music-desktop/compare/v1.8.1...v1.8.2) - 2021-03-09
### 修复
- 修复歌曲ID存储变更导致酷狗图片获取失败的问题
- 修复收藏的在线列表id迁移保存出错的问题
## [1.8.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.8.0...v1.8.1) - 2021-03-07
### 修复
- 修复歌词翻译的主题颜色适配问题
## [1.8.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.7.1...v1.8.0) - 2021-03-07
### 新增
- 新增设置-其他-列表缓存信息清理功能,注:此功能一般情况下不要使用
- 新增启动参数`-play`可以在启动软件时播放指定歌单使用方法看Readme.md的"启动参数"部分
- 新增逐字歌词播放,默认开启,可到设置界面关闭,注:本功能目前仅对酷狗源的歌曲有效
- 新增自定义源功能,源编写规则可以去常见问题查看
### 优化
- 允许播放除了搜索列表以外的所有歌曲,即原来没有播放按钮或者灰色的歌曲都可以去尝试点击播放。注:该功能的原理是尝试自动切换到其他源播放,所以不一定会播放成功,特别是对于那些独家的资源
- 优化单首歌曲的“添加到列表”弹窗歌曲列表状态的显示;现在在收藏单首歌曲时,若列表存在本歌曲则列表名字将变成灰色不可点击状态。总的来说,在添加单首歌曲时若列表名是灰色,则证明当前歌曲已在那个列表中
- 将歌词翻译放到原文的下方,同时新增当前播放翻译的高亮功能
### 移除
- 移除虾米源。注:虽然已移除该源,但仍可尝试去播放之前添加的歌曲,虽然不一定会成功
### 修复
- 修复音乐搜索列表的稍后播放功能无效的问题
- 修复搜索列表双击不支持播放的源时会导致切歌的问题
- 修复歌单列表加载失败时无法进入歌单打开界面的问题
- 修复mg源歌单列表无法加载的问题
- 修复kg跳转到官方歌曲详情页的歌曲无法播放的问题
- 修复我的列表的歌曲添加到其他列表时不排除当前列表的问题
- 修复在下载列表右击未下载完成的歌曲弹出的右击菜单中没有开始下载选项的问题
### 变更
- 歌词翻译显示功能修改为默认关闭,注:此变更仅影响首次安装软件的用户
### 其他
- 更新electron到v9.4.4
## [1.7.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.7.0...v1.7.1) - 2021-01-30
### 修复
- 修复非透明模式下右侧滚动条无法拖动的问题
- 修复MAC下xm音乐滑块验证问题
## [1.7.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.6.1...v1.7.0) - 2021-01-30
### 新增

321
FAQ.md
View File

@@ -8,7 +8,24 @@
## 歌曲无法试听与下载
该问题解决顺序如下:
### 所有歌曲都提示 `请求异常😮,可以多试几次,若还是不行就换一首吧。。。`
尝试更换网络,如切换到移动网络,若移动网络还是不行则尝试开关下手机的飞行模式后再试,<br>
若使用家庭网络的话可尝试将光猫断电5分钟左右再通电联网后播放。
### 提示 `getaddrinfo EAI_AGAIN ...` 或 `无法连接到服务器`
尝试在在浏览器打开这个地址`http://ts.tempmusic.tk`浏览器显示404是正常的如果不是404那就证明所在网络无法访问接口服务器。
若网页无法打开或打开来不是404则可能是DNS的问题可以尝试以下办法
1. 将DNS改成自动获取试试改完可能需要清理下系统DNS缓存才生效
2. 手动把DNS改一下不要用360的DNS可以把DNS改成`223.6.6.6``8.8.8.8`改完可能需要清理下系统DNS缓存才生效
改完DNS后可能需要重启软件才生效
### 通用解决方法
尝试按以下顺序解决:
1. 尝试更新到最新版本
2. 尝试切换其他歌曲(或直接搜索该歌曲),若全部歌曲都无法试听与下载则进行下一步
@@ -21,7 +38,7 @@
若网页无法打开或打来不是404则应该是DNS的问题可以尝试以下办法
1. 将DNS改成自动获取试试
2. 手动把DNS改一下不要用360的DNS可以把DNS改成`114.114.114.114``8.8.8.8`
2. 手动把DNS改一下不要用360的DNS可以把DNS改成`223.6.6.6``8.8.8.8`
## 列表多选
@@ -39,12 +56,79 @@
播放在线列表内的歌曲需要将它们都添加到我的列表才能播放,你可以全选列表内的歌曲然后添加到现有列表或者新创建的列表,然后去播放该列表内的歌曲。
从v1.10.0起,你可以右击排行榜名字的弹出菜单中直接播放或收藏整个排行榜的歌曲。
## 无法打开外部歌单
不支持源打开歌单,请**确认**你需要打开的歌单平台是否与软件标签所写的**歌单源**对应(不一样的话请通过右上角切换歌单源);<br>
不支持源打开歌单,请**确认**你需要打开的歌单平台是否与软件标签所写的**歌单源**对应(不一样的话请通过右上角切换歌单源);<br>
对于分享出来的歌单若打开失败可尝试先在浏览器中打开后再从浏览器地址栏复制URL地址到软件打开<br>
或者如果你知道歌单 id 也可以直接输入歌单 id 打开。<br>
注:网易源的“我喜欢”歌单无法在未登录的情况下打开,所以你需要手动创建一个歌单后将“我喜欢”里的歌曲移动到该歌单打开
### 打开网易源“我喜欢”歌单
由于网易源的“我喜欢”歌单需要登录才能打开从v1.13.0起提供了可以以注入token的方式打开网易源“我喜欢”歌单的功能现若想要打开此类歌单需要在歌单链接或id后面拼上 `###` 再加上有效的token拼接格式`[id|url]###token`例子最后面的xxxxxx替换成你的token
- `https://music.163.com/#/playlist?id=11332&userid=123456###xxxxxx`
- `11332###xxxxxx`
即:将 `歌单链接或者歌单ID``###``token` 这三者拼到一起。
#### `token`的获取方法
**注:`token`是你账号的临时身份令牌,不要随便泄露给他人**<br>
在浏览器打开登录网易云音乐并**登录**后,按`F12`,此时将会打开开发者窗口,然后按你使用的浏览器操作:
##### Chrome、360、QQ等浏览器
这些浏览器打开此窗口时界面可能是中文也可能是英文,英文的话按括号里的来
1. 点击窗口顶部`应用程序(application)`
2. 展开左侧 `Cookies`
3. 点击 `https://music.163.com`
4. 在右侧窗口找到 `名称(Name)``MUSIC_U` 的这行,这行的第二列(`值(Value)`)内的那串内容就是`token`,双击它进入编辑状态,然后按`ctrl + c`键就可以将它复制
##### 火狐浏览器
1. 点击窗口顶部`存储`
2. 展开左侧 `Cookie`
3. 点击 `https://music.163.com`
4. 在右侧窗口找到 `名称``MUSIC_U` 的这行,这行的最后一列(`值`)内的那串内容就是`token`,双击它进入编辑状态,然后按`ctrl + c`键就可以将它复制
## 更新已收藏的在线歌单
该功能仅对直接从歌单详情页点“收藏”按钮收藏的歌单有效,可右击已收藏的列表名从弹出的菜单中选择“更新”使用该功能,
需要注意的是:这将会覆盖本地的目标列表,歌曲将被替换成最新的在线列表。
## 同步功能的使用(实验性,首次使用前建议先备份一次列表)
**注意:由于同步传输时的数据是明文传输,请在受信任的网络下使用此功能!**<br>
此功能需要配合移动端使用PC端与移动端处在同一个局域网路由器的网络下时可以多端实时同步歌曲列表使用方法
1. 在PC端的设置-数据同步开启同步功能(这时如果出现安全软件、防火墙等提示网络连接弹窗时需要点击允许)
2. 在移动端的设置-同步-同步服务器地址输入PC端显示的同步服务器地址如果显示可以多个则输入与**移动端上显示的本机地址**最相似的那个端口号与PC端的同步端口一致**输入完毕后需要按一下键盘上的回车键使输入的内容生效**
3. 输入完这两项后点击“启动同步”
4. 若连接成功对于首次同步时若两边的设备的列表不为空则PC端会弹出选择列表同步方式的弹窗同步方式的说明弹窗下面有介绍
#### 关于同步弹窗的说明
对于首次同步时若两边的设备的列表不为空则PC端会弹出选择列表同步方式的弹窗此弹窗内的同步方式仅针对**首次同步**<br>
第一次同步成功后,以后再同步时将会自动根据两边设备的列表内容合并同步,不信你可以在同步完成后断开两边的连接,然后在两边增删一些歌曲或列表后再同步试试看~😉
#### 连接同步服务失败的可能原因
- 此功能需要PC端与移动端都连接在同一个路由器下的网络才能使用
- 检查防火墙是否拦截了PC端的服务端口
- 路由器若开启了AP隔离则此功能无法使用
#### 连接同步服务失败的检查
1. 确保PC端的同步服务已启用成功若连接码、同步服务地址没有内容则证明服务启动失败此时看启用同步功能复选框后面的错误信息自行解决另外若你不知道端口号是什么意思就不要乱改或不要改得太大与太小
2. 在手机浏览器地址栏输入`http://x.x.x.x:23332/hello` **(注:将`x.x.x.x`换成PC端显示的同步服务地址`23332`为PC端的端口号** 后回车,若此地址可以打开并显示 `Hello~::^-^::`则证明移动端与PC端网络已互通
3. 若移动端无法打开第2步的地址则在PC端的浏览器地址栏输入并打开该地址若可以打开则要么是被LX Music PC端被电脑防火墙拦截要么PC端与移动端不在同一个网络下或者路由器开启了AP隔离一般在公共网络下会出现这种情况
## 界面异常(界面显示不完整)
### Windows 7 下界面异常
@@ -52,10 +136,12 @@
由于软件默认使用了透明窗口根据Electron官方文档的[说明](https://electronjs.org/docs/api/frameless-window#%E5%B1%80%E9%99%90%E6%80%A7)
> 在 windows 操作系统上, 当 DWM 被禁用时, 透明窗口将无法工作。
因此,当 win7 没有使用**AERO**主题时界面将会显示异常开启AERO的方法请自行百度`win7开启aero效果`(开启后可看到任务栏变透明)。<br>
因此,当 win7 没有使用**Aero**主题时界面将会显示异常开启AERO的方法请自行百度`win7开启Aero效果`(开启后可看到任务栏变透明)。<br>
`0.14.0`版本起不再强制要求开启透明效果,若你实在不想开启(若非电脑配置太低,墙裂建议开启!),可通过添加运行参数`-dt`来运行程序即可,例如:`.\lx-music-desktop.exe -dt`,添加方法可自行百度“给快捷方式加参数”,该参数的作用是用来控制程序是否使用非透明窗口运行。
对于一些完全无法正常显示界面、开启了AERO后问题仍未解决的情况请阅读下面的 **软件启动后,界面无法显示** 解决
注:启用**Aero**主题后,若软件出现黑边框,则重启软件即可恢复正常
对于一些完全无法正常显示界面、开启了AERO后问题仍未解决的情况请阅读下面的 **Window 7 下软件启动后,界面无法显示** 解决。
### Linux 下界面异常
@@ -64,19 +150,25 @@
v1.6.0及之后的版本才支持`-dha`参数
## 软件启动后,界面无法显示
## Windows 7 下软件启动后,界面无法显示
对于软件启动后,可以在任务栏看到软件,但软件界面在桌面上无任何显示,或者整个界面偶尔闪烁的情况。<br>
原始问题看:<https://github.com/electron/electron/issues/19569#issuecomment-522231083><br>
解决办法:下载`.NET Framework 4.7.1`或**更高**版本安装即可(建议安装最新版,若安装过程中遇到问题可尝试自行百度解决)。<br>
微软官方下载地址:<https://dotnet.microsoft.com/download/dotnet-framework><br>
下载`Runtime(运行时)`版即可,安装完成后可能需要重启才生效。
下载`Runtime(运行时)`版即可,安装完成后可能需要重启才生效**若出现闪烁的情况**,可阅读下面的**Windows 7 下整个界面闪烁**解决
若还是不行可尝试以下操作:
## Windows 7 下整个界面闪烁(消失又出现)
- 更新显卡驱动
- 添加启动参数`-dha`运行(添加的方法请自行百度“给快捷方式加参数”)
- 尝试将绿色版的软件放在**桌面**或**我的文档**运行
可尝试在关掉软件后,在桌面空白处鼠标右击,在弹出的菜单中选择**个性化**,在弹出的窗口中**切换到系统内置的Aero主题**,然后再启动软件看是否解决。
## Windows 7 下桌面歌词字体列表为空
Windows 7 系统系统需要安装 Powershell 5.1及以上版本才可正常获取系统字体列表。
想要查看当前 Powershell 版本可以在 Powershell 窗口输入命令:`Get-Host`
最新 Powershell 安装包可以去官方 [Github releases](https://github.com/PowerShell/PowerShell/releases) 页下载,安装过程中若出现错误,请自行按照提示或者百度/Google解决。
## 安装版安装失败,提示安装程序并未成功地运行完成
@@ -97,7 +189,7 @@
### Windows 7 系统桌面歌词显示异常
Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看面的 **Windows 7 下界面异常(界面显示不完整)** 方法解决。
Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看面的 **Windows 7 下界面异常** 方法解决。
### MAC OS 系统、桌面歌词有残留阴影
@@ -113,19 +205,15 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的
其他 Linux 系统未测试,如有异常也是意料之中,目前不打算去处理 Linux 平台的桌面歌词问题,但你可以尝试按照`Linux 下界面异常`的解决方案去解决。
## 歌曲下载失败
### 提示 `ENOENT: no such file or directory, mkdir`
## 歌曲下载失败,提示 `ENOENT: no such file or directory, mkdir`
更换下载歌曲目录即可解决(一般是设置的歌曲下载目录没有读写权限导致的)。
### 提示 `请求异常` 或 `Fail`
## 使用软件时导致耳机意外关机
尝试更换网络,如切换到移动网络。
### 其他错误
按照前面的 "歌曲无法试听与下载" 方案解决。
据反馈,漫步者部分型号的耳机与本软件一起使用时将会导致耳机意外关机,
详情看:<https://github.com/lyswhut/lx-music-desktop/issues/457>
若出现该问题可尝试添加`-dhmkh`启动参数解决启动参数添加方法请自行百度“windows给快捷方式添加启动参数”。
## 软件安装包说明
@@ -137,9 +225,9 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的
**`.dmg`** 结尾的文件为 MAC 版本;
**`.AppImage`**、**`.deb`** 结尾的为 Linux 版本。
**`.AppImage`**、**`.deb`**、**`.rpm`**、**`.pacman`** 结尾的为 Linux 版本。
带有`x64`的为64位的系统版本`x86`的为32位的系统版本若两个都带有的则为集合版安装时会自动根据系统位数选择对应的版本安装。
带有`x64`的为64位的系统版本`x86`的为32位的系统版本若两个都带有的则为集合版安装时会自动根据系统位数选择对应的版本安装;带有`arm`的为arm架构系统的版本
## 软件更新
@@ -147,13 +235,13 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的
若下载未完成时软件被关闭,下次启动软件会再次自动下载。<br>
若还是**更新失败**可能是无法访问GitHub导致的这时需要手动更新即下载最新安装包直接覆盖安装即可。<br>
注意:**绿色版**的软件自动更新功能**不可用**,建议使用安装版!!<br>
注意:**Mac版**、**Linux deb**版不支持自动更新!
注意:**Mac版**、**Linux**版不支持自动更新!
## 更新已收藏的在线歌单
### Windows 安装版在升级后,卸载了旧版本,但没有安装新版本
该功能仅对直接从歌单详情页点“收藏”按钮收藏的歌单有效,可右击已收藏的列表名从弹出的菜单中选择“同步”使用该功能,
出现这个问题的原因一般是你当初在安装本软件的时候是以管理员身份安装的,运行软件的时候没有以管理员身份运行,所以卸载后无法再装上。
需要注意的是:这将会覆盖本地的目标列表,歌曲将被替换成最新的在线列表
安装本软件时建议选择 `为当前用户安装`,并安装在当前用户目录或者安装在不需要管理员权限的目录(即其他分区下),不要选`为所有用户安装`
## 缺少`xxx.dll`
@@ -162,12 +250,189 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的
- 以管理员权限打开`cmd`,输入`sfc /scannow`回车等待检查完成重启电脑
- 若上面的方法**修复、重启**电脑后仍然不行,就自行百度弹出的**错误信息**看下别人是怎么解决的
## MAC OS无法启动软件提示 lx-music-desktop 已损坏
这是因为软件没有签名,被系统阻止运行,<br>
在终端里输入 `sudo xattr -rd com.apple.quarantine /Applications/lx-music-desktop.app`,然后输入你的电脑密码即可
还可以参考:
- <http://www.pc6.com/edu/168719.html>
- <https://blog.csdn.net/for641/article/details/104811538>
## 杀毒软件提示有病毒或恶意行为
本人只能保证我写的代码不包含任何**恶意代码**、**收集用户信息**的行为并且软件代码已开源请自行查阅软件安装包也是由CI拉取源代码构建构建日志[windows包](https://ci.appveyor.com/project/lyswhut/lx-music-desktop)、[Mac/Linux包](https://travis-ci.com/github/lyswhut/lx-music-desktop)<br>
本人只能保证我写的代码不包含任何**恶意代码**、**收集用户信息**的行为并且软件代码已开源请自行查阅软件安装包也是由CI拉取源代码构建构建日志[GitHub Actions](https://github.com/lyswhut/lx-music-desktop/actions)<br>
尽管如此但这不意味着软件是100%安全的,由于软件使用了第三方依赖,当这些依赖存在恶意行为时([供应链攻击](https://docs.microsoft.com/zh-cn/windows/security/threat-protection/intelligence/supply-chain-malware)),软件也将会受到牵连,所以我只能尽量选择使用较多人用、信任度较高的依赖。<br>
当然,以上说明建立的前提是在你所用的安装包是从**本项目主页上写的链接**下载的,或者有相关能力者还可以下载源代码自己构建安装包。
`v0.17.0`起,由于加入了音频输出设备切换功能,该功能调用了 [MediaDevices.enumerateDevices()](https://developer.mozilla.org/zh-CN/docs/Web/API/MediaDevices/enumerateDevices),可能导致安全软件提示洛雪要访问摄像头(目前发现卡巴斯基会提示),但实际上没有用到摄像头,并且摄像头的提示灯也不会亮,你可以选择阻止访问。
最后,若出现杀毒软件报毒、存在恶意行为,请自行判断选择是否继续使用本软件!
## 自定义源脚本编写说明
文件请使用UTF-8编码格式编写脚本所用编程语言为JavaScript可以使用ES6+语法,脚本与应用的交互是使用类似事件收发的方式进行,这是一个基本的脚本例子:
```js
/**
* @name 测试音乐源
* @description 我只是一个测试音乐源哦
* @version 1.0.0
* @author xxx
* @homepage http://xxx
*/
const { EVENT_NAMES, request, on, send } = window.lx
const qualitys = {
kw: {
'128k': '128',
'320k': '320',
flac: 'flac',
},
}
const httpRequest = (url, options) => new Promise((resolve, reject) => {
request(url, options, (err, resp) => {
if (err) return reject(err)
resolve(resp.body)
})
})
const apis = {
kw: {
musicUrl({ songmid }, quality) {
return httpRequest('http://xxx').then(data => {
return data.url
})
},
},
}
// 注册应用API请求事件
// source 音乐源可能的值取决于初始化时传入的sources对象的源key值
// info 请求附加信息内容根据action变化
// action 请求操作类型目前只有musicUrl即获取音乐URL链接
// 当action为musicUrl时info的结构{type, musicInfo}
// info.type音乐质量可能的值有128k / 320k / flac取决于初始化时对应源传入的qualitys值中的一个
// info.musicInfo音乐信息对象里面有音乐ID、名字等信息
on(EVENT_NAMES.request, ({ source, action, info }) => {
// 回调必须返回 Promise 对象
switch (action) {
// action 为 musicUrl 时需要在 Promise 返回歌曲 url
case 'musicUrl':
return apis[source].musicUrl(info.musicInfo, qualitys[source][info.type]).catch(err => {
console.log(err)
return Promise.reject(err)
})
}
})
// 脚本初始化完成后需要发送inited事件告知应用
send(EVENT_NAMES.inited, {
status: true, // 初始化成功 or 失败
openDevTools: false, // 是否打开开发者工具,方便用于调试脚本
sources: { // 当前脚本支持的源
kw: { // 支持的源对象可用key值kw/kg/tx/wy/mg
name: '酷我音乐',
type: 'music', // 目前固定为 music
actions: ['musicUrl'], // 目前固定为 ['musicUrl']
qualitys: ['128k', '320k', 'flac'], // 当前脚本的该源所支持获取的Url音质有效的值有['128k', '320k', 'flac']
},
},
})
```
### 自定义源信息
文件的开头必须包含以下注释:
```js
/**
* @name 测试脚本
* @description 我只是一个测试脚本
* @version 1.0.0
* @author xxx
* @homepage http://xxx
*/
```
- `@name `源的名字建议不要过长24个字符以内
- `@description `源的描述建议不要过长36个字符以内可不填不填时必须保留 @description
- `@version`:源的版本号,可不填,不填时可以删除 @version
- `@author `:脚本作者名字,可不填,不填时可以删除 @author
- `@homepage `:脚本主页,可不填,不填时可以删除 @homepage
### `window.lx`
应用为脚本暴露的API对象。
#### `window.lx.version`
自定义源API版本API变更时此版本号将会更改新增于v1.14.0之后)
#### `window.lx.EVENT_NAMES`
常量事件名称对象,发送、注册事件时传入事件名时使用,可用值:
| 事件名 | 描述
| --- | ---
| `inited` | 脚本初始化完成后发送给应用的事件名,发送该事件时需要传入以下信息:`{status, sources, openDevTools}`<br>`status`:初始化结果(`true`成功,`false`失败)<br>`openDevTools`是否打开DevTools此选项可用于开发脚本时的调试<br>`sources`:支持的源信息对象,<br>`sources[kw/kg/tx/wy/mg].name`:源的名字(目前非必须)<br>`sources[kw/kg/tx/wy/mg].type`:源类型,目前固定值需为`music`<br>`sources[kw/kg/tx/wy/mg].actions`支持的actions由于目前只支持`musicUrl`,所以固定传`['musicUrl']`即可<br>`sources[kw/kg/tx/wy/mg].qualitys`:该源支持的音质列表,有效的值为`['128k', '320k', 'flac']`,该字段用于控制应用可用的音质类型
| `request` | 应用API请求事件名回调入参`handler({ source, action, info})`,回调必须返回`Promise`对象<br>`source`:音乐源,可能的值取决于初始化时传入的`sources`对象的源key值<br>`info`:请求附加信息,内容根据`action`变化<br>`action`:请求操作类型,目前只有`musicUrl`即获取音乐URL链接需要在 Promise 返回歌曲 url`info`的结构:`{type, musicInfo}``info.type`:音乐质量,可能的值有`128k` / `320k` / `flac`(取决于初始化时对应源传入的`qualitys`值中的一个),`info.musicInfo`音乐信息对象里面有音乐ID、名字等信息
#### `window.lx.on`
事件注册方法,应用主动与脚本通信时使用:
```js
/**
* @param event_name 事件名
* @param handler 事件处理回调 -- 注意:注册的回调必须返回 Promise 对象
*/
window.lx.on(event_name, handler)
```
**注意:** 注册的回调必须返回 `Promise` 对象。
#### `window.lx.send`
事件发送方法,脚本主动与应用通信时使用:
```js
/**
* @param event_name 事件名
* @param datas 要传给应用的数据
*/
window.lx.send(event_name, datas)
```
#### `window.lx.request`
HTTP请求方法用于发送HTTP请求此HTTP请求方法不受跨域规则限制
```js
/**
* @param url 请求的URL
* @param options 请求选项,可用选项有 method / headers / body / form / formData / timeout
* @param callback 请求结果的回调 入参err, resp, body
* @return 返回一个方法调用此方法可以终止HTTP请求
*/
const cancelHttp = window.lx.request(url, options, callback)
```
#### `window.lx.utils`
应用提供给脚本的工具方法:
- `window.lx.utils.buffer.from`对应Node.js的 `Buffer.from`
- `window.lx.utils.buffer.bufToString`Buffer转字符串 `bufToString(buffer, format)``format`对应Node.js `Buffer.toString`的参数v1.14.0之后新增)
- `window.lx.utils.crypto.aesEncrypt`AES加密 `aesEncrypt(buffer, mode, key, iv)`
- `window.lx.utils.crypto.md5`MD5加密 `md5(str)`
- `window.lx.utils.crypto.randomBytes`:生成随机字符串 `randomBytes(size)`
- `window.lx.utils.crypto.rsaEncrypt`RSA加密 `rsaEncrypt(buffer, key)`
目前仅提供以上工具方法如果需要其他方法可以开issue讨论。

View File

@@ -2,8 +2,8 @@
<p align="center">
<a href="https://github.com/lyswhut/lx-music-desktop/releases"><img src="https://img.shields.io/github/release/lyswhut/lx-music-desktop" alt="Release version"></a>
<a href="https://ci.appveyor.com/project/lyswhut/lx-music-desktop"><img src="https://ci.appveyor.com/api/projects/status/flrsqd5ymp8fnte5?svg=true" alt="Build status"></a>
<a href="https://travis-ci.com/lyswhut/lx-music-desktop"><img src="https://travis-ci.com/lyswhut/lx-music-desktop.svg?branch=master" alt="Build status"></a>
<a href="https://github.com/lyswhut/lx-music-desktop/actions/workflows/release.yml"><img src="https://github.com/lyswhut/lx-music-desktop/workflows/Build/badge.svg" alt="Build status"></a>
<a href="https://github.com/lyswhut/lx-music-desktop/actions/workflows/beta-pack.yml"><img src="https://github.com/lyswhut/lx-music-desktop/workflows/Build%20Beta/badge.svg" alt="Build status"></a>
<a href="https://electronjs.org/releases/stable"><img src="https://img.shields.io/github/package-json/dependency-version/lyswhut/lx-music-desktop/dev/electron/master" alt="Electron version"></a>
<!-- <a href="https://github.com/lyswhut/lx-music-desktop/releases"><img src="https://img.shields.io/github/downloads/lyswhut/lx-music-desktop/latest/total" alt="Downloads"></a> -->
<a href="https://github.com/lyswhut/lx-music-desktop/tree/dev"><img src="https://img.shields.io/github/package-json/v/lyswhut/lx-music-desktop/dev" alt="Dev branch version"></a>
@@ -36,8 +36,8 @@
所用技术栈:
- Electron 9
- Vue 2
- Electron 13
- Vue 3
已支持的平台:
@@ -47,12 +47,12 @@
软件变化请查看:[更新日志](https://github.com/lyswhut/lx-music-desktop/blob/master/CHANGELOG.md)<br>
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)<br>
或者到网盘下载网盘内有MAC、windows版`https://www.lanzoux.com/b0bf2cfa/` 密码:`glqw`<br>
或者到网盘下载网盘内有MAC、windows版`https://www.lanzoui.com/b0bf2cfa/` 密码:`glqw`(若链接无法打开请百度:蓝奏云链接打不开)<br>
使用常见问题请转至:[常见问题](https://github.com/lyswhut/lx-music-desktop/blob/master/FAQ.md)
### 源码使用方法
环境要求Node.js 12.x+
环境要求Node.js 14+
```bash
# 开发模式
@@ -82,7 +82,15 @@ npm run pack:linux
- `-search` 启动软件时自动在搜索框搜索指定的内容,例如:`-search="突然的自我 - 伍佰"`
- `-dha` 禁用硬件加速启动Disable Hardware Acceleration窗口显示有问题时可以尝试添加此参数启动v1.6.0起新增)
- `-dt` 以非透明模式启动Disable Transparent对于未开启AERO效果的win7系统可加此参数启动以确保界面正常显示原来的`-nt`参数已重命名为`-dt`v1.6.0起重命名)
- `-dt` 以非透明模式启动Disable Transparent对于未开启AERO效果的win7系统可加此参数启动以确保界面正常显示(注:该参数对桌面歌词无效),原来的`-nt`参数已重命名为`-dt`v1.6.0起重命名)
- `-dhmkh` 禁用硬件媒体密钥处理Disable Hardware Media Key Handling此选项将禁用Chromium的Hardware Media Key Handling特性v1.9.0起新增)
- `-play` 启动时播放指定列表的音乐,参数说明:
- `type`:播放类型,目前固定为`songList`
- `source`:播放源,可用值为`kw/kg/tx/wy/mg/myList`,其中`kw/kg/tx/wy/mg`对应各源的在线列表,`myList`为本地列表
- `link`要播放的在线列表歌单链接、或IDsource为`kw/kg/tx/wy/mg`之一(在线列表)时必传,举例:`./lx-music-desktop -play="type=songList&source=kw&link=歌单URL or ID"`注意如果传入URL时必须对URL进行编码后再传入
- `name`要播放的本地列表歌单名字source为`myList`时必传,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表"`
- `index`:从列表的哪个位置开始播放,选传,若不传默认播放第一首歌曲,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表&index=2"`
### 常见问题

View File

@@ -2,7 +2,8 @@ const isDev = process.env.NODE_ENV === 'development'
module.exports = {
modules: {
localIdentName: isDev ? '[folder]-[name]--[local]--[hash:base64:5]' : '[hash:base64:5]',
localIdentName: isDev ? '[path][name]__[local]--[hash:base64:5]' : '[hash:base64:5]',
exportLocalsConvention: 'camelCase',
},
sourceMap: isDev,
}

View File

@@ -1,4 +1,5 @@
const path = require('path')
const ESLintPlugin = require('eslint-webpack-plugin')
module.exports = {
target: 'electron-main',
@@ -19,24 +20,15 @@ module.exports = {
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'eslint-loader',
options: {
formatter: require('eslint-formatter-friendly'),
},
},
exclude: /node_modules/,
enforce: 'pre',
test: /\.node$/,
use: 'node-loader',
},
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
],
},
performance: {
maxEntrypointSize: 300000,
},
plugins: [
new ESLintPlugin(),
],
}

View File

@@ -1,7 +1,6 @@
const path = require('path')
const { merge } = require('webpack-merge')
const webpack = require('webpack')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const baseConfig = require('./webpack.config.base')
@@ -17,19 +16,7 @@ module.exports = merge(baseConfig, {
NODE_ENV: '"development"',
},
__static: `"${path.join(__dirname, '../../src/static').replace(/\\/g, '\\\\')}"`,
}),
new webpack.NoEmitOnErrorsPlugin(),
new FriendlyErrorsPlugin({
onErrors(severity, errors) { // Silent warning from electron-debug
if (severity != 'warning') return
for (let i = errors.length - 1; i > -1; i--) {
const error = errors[i]
if (error.file == './node_modules/electron-debug/index.js') errors.splice(i, 1)
}
// You can listen to errors transformed and prioritized by the plugin
// severity can be 'error' or 'warning'
},
__userApi: `"${path.join(__dirname, '../../src/main/modules/userApi').replace(/\\/g, '\\\\')}"`,
}),
],
})

View File

@@ -1,6 +1,7 @@
const path = require('path')
const { merge } = require('webpack-merge')
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const baseConfig = require('./webpack.config.base')
@@ -14,12 +15,25 @@ module.exports = merge(baseConfig, {
},
externals: [
...Object.keys(dependencies || {}),
// 'font-list',
],
node: {
__dirname: false,
__filename: false,
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: path.join(__dirname, '../../src/main/modules/userApi/renderer'),
to: path.join(__dirname, '../../dist/electron/userApi/renderer'),
},
{
from: path.join(__dirname, '../../src/main/modules/userApi/rendererEvent/name.js'),
to: path.join(__dirname, '../../dist/electron/userApi/rendererEvent/name.js'),
},
],
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"',

View File

@@ -1,7 +1,8 @@
const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const { VueLoaderPlugin } = require('vue-loader')
const HTMLPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const ESLintPlugin = require('eslint-webpack-plugin')
const vueLoaderConfig = require('../vue-loader.config')
const { mergeCSSLoader } = require('../utils')
@@ -17,10 +18,11 @@ module.exports = {
filename: '[name].js',
libraryTarget: 'commonjs2',
path: path.join(__dirname, '../../dist/electron'),
publicPath: './',
publicPath: 'auto',
},
resolve: {
alias: {
'@': path.join(__dirname, '../../src'),
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
@@ -32,15 +34,8 @@ module.exports = {
module: {
rules: [
{
test: /\.(vue|js)$/,
use: {
loader: 'eslint-loader',
options: {
formatter: require('eslint-formatter-friendly'),
},
},
exclude: /node_modules/,
enforce: 'pre',
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.vue$/,
@@ -65,15 +60,6 @@ module.exports = {
},
}),
},
{
test: /\.styl(:?us)?$/,
oneOf: mergeCSSLoader({
loader: 'stylus-loader',
options: {
sourceMap: true,
},
}),
},
{
test: /\.pug$/,
oneOf: [
@@ -90,26 +76,53 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'imgs/[name]--[folder].[ext]',
exclude: path.join(__dirname, '../../src/renderer/assets/svgs'),
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'imgs/[name]-[contenthash:8][ext]',
},
},
{
test: /\.svg$/,
include: path.join(__dirname, '../../src/renderer/assets/svgs'),
use: [
{
loader: 'svg-sprite-loader',
options: {
symbolId: 'icon-[name]',
},
},
'svg-transform-loader',
'svgo-loader',
],
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'media/[name]--[folder].[ext]',
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'media/[name]-[contenthash:8][ext]',
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'fonts/[name]--[folder].[ext]',
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'fonts/[name]-[contenthash:8][ext]',
},
},
],
@@ -132,5 +145,8 @@ module.exports = {
filename: isDev ? '[name].css' : '[name].[contenthash:8].css',
chunkFilename: isDev ? '[id].css' : '[id].[contenthash:8].css',
}),
new ESLintPlugin({
extensions: ['js', 'vue'],
}),
],
}

View File

@@ -1,6 +1,5 @@
const path = require('path')
const webpack = require('webpack')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const { merge } = require('webpack-merge')
@@ -11,13 +10,13 @@ module.exports = merge(baseConfig, {
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new FriendlyErrorsPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"',
ELECTRON_DISABLE_SECURITY_WARNINGS: 'true',
},
__VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false',
__static: `"${path.join(__dirname, '../../src/static').replace(/\\/g, '\\\\')}"`,
}),
],

View File

@@ -1,6 +1,6 @@
const path = require('path')
const webpack = require('webpack')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const { merge } = require('webpack-merge')
@@ -9,7 +9,8 @@ const baseConfig = require('./webpack.config.base')
const { dependencies } = require('../../package.json')
let whiteListedModules = ['vue']
// let whiteListedModules = ['vue']
let whiteListedModules = ['vue', 'vue-router', 'vuex', 'vue-i18n']
module.exports = merge(baseConfig, {
@@ -31,13 +32,14 @@ module.exports = merge(baseConfig, {
'process.env': {
NODE_ENV: '"production"',
},
__VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false',
}),
],
optimization: {
chunkIds: 'named',
minimizer: [
new TerserPlugin(),
new OptimizeCSSAssetsPlugin({}),
new CssMinimizerPlugin(),
],
},
performance: {

View File

@@ -1,7 +1,8 @@
const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const { VueLoaderPlugin } = require('vue-loader')
const HTMLPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const ESLintPlugin = require('eslint-webpack-plugin')
const vueLoaderConfig = require('../vue-loader.config')
const { mergeCSSLoader } = require('../utils')
@@ -17,10 +18,11 @@ module.exports = {
filename: '[name].js',
libraryTarget: 'commonjs2',
path: path.join(__dirname, '../../dist/electron'),
publicPath: './',
publicPath: 'auto',
},
resolve: {
alias: {
'@': path.join(__dirname, '../../src'),
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
@@ -32,15 +34,8 @@ module.exports = {
module: {
rules: [
{
test: /\.(vue|js)$/,
use: {
loader: 'eslint-loader',
options: {
formatter: require('eslint-formatter-friendly'),
},
},
exclude: /node_modules/,
enforce: 'pre',
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.vue$/,
@@ -65,15 +60,6 @@ module.exports = {
},
}),
},
{
test: /\.styl(:?us)?$/,
oneOf: mergeCSSLoader({
loader: 'stylus-loader',
options: {
sourceMap: true,
},
}),
},
{
test: /\.pug$/,
oneOf: [
@@ -90,26 +76,53 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'imgs/[name]--[folder].[ext]',
exclude: path.join(__dirname, '../../src/renderer/assets/svgs'),
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'imgs/[name]-[contenthash:8][ext]',
},
},
{
test: /\.svg$/,
include: path.join(__dirname, '../../src/renderer/assets/svgs'),
use: [
{
loader: 'svg-sprite-loader',
options: {
symbolId: 'icon-[name]',
},
},
'svg-transform-loader',
'svgo-loader',
],
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'media/[name]--[folder].[ext]',
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'media/[name]-[contenthash:8][ext]',
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'fonts/[name]--[folder].[ext]',
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 10000,
},
},
generator: {
filename: 'fonts/[name]-[contenthash:8][ext]',
},
},
],
@@ -120,7 +133,7 @@ module.exports = {
plugins: [
new HTMLPlugin({
filename: 'index.html',
template: path.join(__dirname, '../../src/renderer/index.pug'),
template: path.join(__dirname, '../../src/renderer/index.html'),
isProd: process.env.NODE_ENV == 'production',
browser: process.browser,
__dirname,
@@ -132,5 +145,8 @@ module.exports = {
filename: isDev ? '[name].css' : '[name].[contenthash:8].css',
chunkFilename: isDev ? '[id].css' : '[id].[contenthash:8].css',
}),
new ESLintPlugin({
extensions: ['js', 'vue'],
}),
],
}

View File

@@ -1,6 +1,5 @@
const path = require('path')
const webpack = require('webpack')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const { merge } = require('webpack-merge')
@@ -11,13 +10,13 @@ module.exports = merge(baseConfig, {
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new FriendlyErrorsPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"',
ELECTRON_DISABLE_SECURITY_WARNINGS: 'true',
},
__VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false',
__static: `"${path.join(__dirname, '../../src/static').replace(/\\/g, '\\\\')}"`,
}),
],

View File

@@ -1,6 +1,6 @@
const path = require('path')
const webpack = require('webpack')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const { merge } = require('webpack-merge')
@@ -9,7 +9,7 @@ const baseConfig = require('./webpack.config.base')
const { dependencies } = require('../../package.json')
let whiteListedModules = ['vue']
let whiteListedModules = ['vue', 'vue-router', 'vuex', 'vue-i18n']
module.exports = merge(baseConfig, {
@@ -31,13 +31,15 @@ module.exports = merge(baseConfig, {
'process.env': {
NODE_ENV: '"production"',
},
__VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false',
}),
],
optimization: {
chunkIds: 'named',
minimize: false,
minimizer: [
new TerserPlugin(),
new OptimizeCSSAssetsPlugin({}),
new CssMinimizerPlugin(),
],
},
performance: {

View File

@@ -16,7 +16,8 @@ const rendererLyricConfig = require('./renderer-lyric/webpack.config.dev')
let electronProcess = null
let manualRestart = false
let hotMiddleware
let hotMiddlewareRenderer
let hotMiddlewareRendererLyric
function startRenderer() {
@@ -24,7 +25,7 @@ function startRenderer() {
// rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)
// rendererConfig.mode = 'development'
const compiler = webpack(rendererConfig)
hotMiddleware = webpackHotMiddleware(compiler, {
hotMiddlewareRenderer = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500,
})
@@ -32,15 +33,15 @@ function startRenderer() {
compiler.hooks.compilation.tap('compilation', compilation => {
// console.log(Object.keys(compilation.hooks))
HtmlWebpackPlugin.getHooks(compilation).beforeEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => {
hotMiddleware.publish({ action: 'reload' })
hotMiddlewareRenderer.publish({ action: 'reload' })
cb()
})
})
compiler.hooks.done.tap('done', stats => {
// logStats('Renderer', 'Compile done')
// logStats('Renderer', stats)
})
// compiler.hooks.done.tap('done', stats => {
// // logStats('Renderer', 'Compile done')
// // logStats('Renderer', stats)
// })
const server = new WebpackDevServer(
compiler,
@@ -54,7 +55,7 @@ function startRenderer() {
errors: true,
},
before(app, ctx) {
app.use(hotMiddleware)
app.use(hotMiddlewareRenderer)
ctx.middleware.waitUntilValid(() => {
resolve()
})
@@ -71,7 +72,7 @@ function startRendererLyric() {
// rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)
// rendererConfig.mode = 'development'
const compiler = webpack(rendererLyricConfig)
hotMiddleware = webpackHotMiddleware(compiler, {
hotMiddlewareRendererLyric = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500,
})
@@ -79,15 +80,15 @@ function startRendererLyric() {
compiler.hooks.compilation.tap('compilation', compilation => {
// console.log(Object.keys(compilation.hooks))
HtmlWebpackPlugin.getHooks(compilation).beforeEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => {
hotMiddleware.publish({ action: 'reload' })
hotMiddlewareRendererLyric.publish({ action: 'reload' })
cb()
})
})
compiler.hooks.done.tap('done', stats => {
// logStats('Renderer', 'Compile done')
// logStats('Renderer', stats)
})
// compiler.hooks.done.tap('done', stats => {
// // logStats('Renderer', 'Compile done')
// // logStats('Renderer', stats)
// })
const server = new WebpackDevServer(
compiler,
@@ -101,7 +102,7 @@ function startRendererLyric() {
errors: true,
},
before(app, ctx) {
app.use(hotMiddleware)
app.use(hotMiddlewareRendererLyric)
ctx.middleware.waitUntilValid(() => {
resolve()
})
@@ -120,7 +121,8 @@ function startMain() {
const compiler = webpack(mainConfig)
compiler.hooks.watchRun.tapAsync('watch-run', (compilation, done) => {
hotMiddleware.publish({ action: 'compiling' })
hotMiddlewareRenderer.publish({ action: 'compiling' })
hotMiddlewareRendererLyric.publish({ action: 'compiling' })
done()
})
@@ -179,6 +181,9 @@ function startElectron() {
function electronLog(data, color) {
let log = data.toString()
if (/[0-9A-z]+/.test(log)) {
// 抑制 user api 窗口使用 data url 加载页面时 vue扩展 的报错日志刷屏的问题
if (color == 'red' && typeof log === 'string' && log.includes('"Extension server error: Operation failed: Permission denied", source: devtools://devtools/bundled/extensions/extensions.js')) return
console.log(chalk[color](log))
}
}

View File

@@ -2,8 +2,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const cssLoaderConfig = require('./css-loader.config')
const chalk = require('chalk')
const isDev = process.env.NODE_ENV === 'development'
// merge css-loader
exports.mergeCSSLoader = beforeLoader => {
const loader = [
@@ -14,7 +12,7 @@ exports.mergeCSSLoader = beforeLoader => {
{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: isDev,
esModule: false,
},
},
{
@@ -30,7 +28,7 @@ exports.mergeCSSLoader = beforeLoader => {
{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: isDev,
esModule: false,
},
},
'css-loader',

View File

@@ -1,19 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
// This is the line you want to add
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"baseUrl": "./",
"paths": {
"@main": ["src/main"],
"@renderer": ["src/renderer"],
"@lyric": ["src/renderer-lyric"],
"@static": ["src/static"],
"@common": ["src/common"],
"@main/*": ["src/main/*"],
"@renderer/*": ["src/renderer/*"],
"@lyric/*": ["src/renderer-lyric/*"],
"@static/*": ["src/static/*"],
"@common/*": ["src/common/*"],
}
},
"include": ["src/**/*"],
"exclude": ["node_modules/**/*"]
"exclude": ["node_modules", "build", "dist"]
}

16120
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,89 +1,102 @@
{
"name": "lx-music-desktop",
"version": "1.7.0",
"version": "1.16.0",
"description": "一个免费的音乐查找助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
"scripts": {
"pack": "node build-config/pack.js && npm run pack:win:setup:x64",
"pack:win": "node build-config/pack.js && npm run pack:win:setup:x86_64 && npm run pack:win:7z",
"pack:win:setup:x86_64": "cross-env TARGET=win_安装版 ARCH=x86_64 electron-builder -w=nsis --x64 --ia32",
"pack:win:setup:x64": "cross-env TARGET=win_安装版 ARCH=x64 electron-builder -w=nsis --x64",
"pack:win:setup:x86": "cross-env TARGET=win_安装版 ARCH=x86 electron-builder -w=nsis --ia32",
"pack:win": "node build-config/pack.js && npm run pack:win:setup:x64 && npm run pack:win:setup:x86 && npm run pack:win:setup:arm64 && npm run pack:win:setup:x86_64 && npm run pack:win:7z",
"pack:win:setup:x86_64": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p never",
"pack:win:setup:x64": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p never",
"pack:win:setup:x86": "cross-env TARGET=Setup ARCH=x86 electron-builder -w=nsis --ia32 -p never",
"pack:win:setup:arm64": "cross-env TARGET=Setup ARCH=arm64 electron-builder -w=nsis --arm64 -p never",
"pack:win:portable": "npm run pack:win:portable:x86_64 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
"pack:win:portable:x86_64": "cross-env TARGET=便携版 ARCH=x86_64 electron-builder -w=portable --x64 --ia32",
"pack:win:portable:x64": "cross-env TARGET=便携版 ARCH=x64 electron-builder -w=portable --x64",
"pack:win:portable:x86": "cross-env TARGET=便携版 ARCH=x86 electron-builder -w=portable --ia32",
"pack:win:portable:x86_64": "cross-env TARGET=portable ARCH=x86_64 electron-builder -w=portable --x64 --ia32 -p never",
"pack:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p never",
"pack:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p never",
"pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86",
"pack:win:7z:x64": "cross-env TARGET=win_绿色版 ARCH=x64 electron-builder -w=7z --x64",
"pack:win:7z:x86": "cross-env TARGET=win_绿色版 ARCH=x86 electron-builder -w=7z --ia32",
"pack:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p never",
"pack:win:7z:x86": "cross-env TARGET=green ARCH=win_x86 electron-builder -w=7z --ia32 -p never",
"pack:win:7z:arm64": "cross-env TARGET=green ARCH=win_arm64 electron-builder -w=7z --arm64 -p never",
"pack:linux": "node build-config/pack.js && npm run pack:linux:deb && npm run pack:linux:appImage && npm run pack:linux:rpm && npm run pack:linux:pacman",
"pack:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage -p never",
"pack:linux:deb": "npm run pack:linux:deb:x64 && npm run pack:linux:deb:x86 && npm run pack:linux:deb:arm64 && npm run pack:linux:deb:armv7l",
"pack:linux:deb:x64": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p never",
"pack:linux:deb:x86": "cross-env ARCH=x86 electron-builder -l=deb --ia32 -p never",
"pack:linux:deb:arm64": "cross-env ARCH=arm64 electron-builder -l=deb --arm64 -p never",
"pack:linux:deb:armv7l": "cross-env ARCH=armv7l electron-builder -l=deb --armv7l -p never",
"pack:linux:rpm": "cross-env ARCH=x64 electron-builder -l=rpm --x64 -p never",
"pack:linux:pacman": "cross-env ARCH=x64 electron-builder -l=pacman --x64 -p never",
"pack:mac": "node build-config/pack.js && npm run pack:mac:dmg && npm run pack:mac:dmg:arm64",
"pack:mac:dmg": "cross-env electron-builder -m=dmg -p never",
"pack:mac:dmg:arm64": "cross-env electron-builder -m=dmg --arm64 -p never",
"pack:dir": "node build-config/pack.js && electron-builder --dir",
"publish": "node publish",
"publish:gh": "node build-config/pack.js && npm run publish:win",
"publish:win": "npm run publish:win:7z && npm run publish:win:setup",
"publish:win:setup": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p onTagOrDraft",
"publish:win:setup:x64:always": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p always",
"publish:win:setup:x64": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p always",
"publish:win:setup:x86": "cross-env TARGET=Setup ARCH=x86 electron-builder -w=nsis --ia32 -p onTagOrDraft",
"publish:win:setup:arm64": "cross-env TARGET=Setup ARCH=arm64 electron-builder -w=nsis --arm64 -p onTagOrDraft",
"publish:win:setup:x86_64": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p onTagOrDraft",
"publish:win:portable": "npm run publish:win:portable:x86_64 && npm run publish:win:portable:x64 && npm run publish:win:portable:x86",
"publish:win:portable:x86_64": "cross-env TARGET=portable ARCH=x86_64 electron-builder -w=portable --x64 --ia32 -p onTagOrDraft",
"publish:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p onTagOrDraft",
"publish:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p onTagOrDraft",
"publish:win:7z": "npm run publish:win:7z:x64 && npm run publish:win:7z:x86",
"publish:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p always",
"publish:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p onTagOrDraft",
"publish:win:7z:x86": "cross-env TARGET=green ARCH=win_x86 electron-builder -w=7z --ia32 -p onTagOrDraft",
"publish:gh:mac": "node build-config/pack.js && npm run publish:mac",
"publish:mac": "npm run publish:mac:dmg",
"publish:win:7z:arm64": "cross-env TARGET=green ARCH=win_arm64 electron-builder -w=7z --arm64 -p onTagOrDraft",
"publish:mac:dmg:always": "electron-builder -m=dmg -p always",
"publish:mac:dmg": "electron-builder -m=dmg -p onTagOrDraft",
"publish:gh:linux": "node build-config/pack.js && npm run publish:linux",
"publish:linux": "npm run publish:linux:deb && npm run publish:linux:appImage && npm run publish:linux:rpm && npm run publish:linux:pacman",
"publish:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage -p onTagOrDraft",
"publish:linux:deb": "npm run publish:linux:deb:x64 && npm run publish:linux:deb:x86 && npm run publish:linux:deb:arm64",
"publish:mac:dmg:arm64": "electron-builder -m=dmg --arm64 -p onTagOrDraft",
"publish:linux:deb:x64:always": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p always",
"publish:linux:deb:x64": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p onTagOrDraft",
"publish:linux:deb:x86": "cross-env ARCH=x86 electron-builder -l=deb --ia32 -p onTagOrDraft",
"publish:linux:deb:arm64": "cross-env ARCH=arm64 electron-builder -l=deb --arm64 -p onTagOrDraft",
"publish:linux:deb:armv7l": "cross-env ARCH=armv7l electron-builder -l=deb --armv7l -p onTagOrDraft",
"publish:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage -p onTagOrDraft",
"publish:linux:rpm": "cross-env ARCH=x64 electron-builder -l=rpm --x64 -p onTagOrDraft",
"publish:linux:pacman": "cross-env ARCH=x64 electron-builder -l=pacman --x64 -p onTagOrDraft",
"pack:linux": "node build-config/pack.js && npm run pack:linux:deb && npm run pack:linux:appImage && npm run pack:linux:rpm && npm run pack:linux:pacman",
"pack:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage",
"pack:linux:deb": "npm run pack:linux:deb:x64 && npm run pack:linux:deb:x86 && npm run pack:linux:deb:arm64",
"pack:linux:deb:x64": "cross-env ARCH=x64 electron-builder -l=deb --x64",
"pack:linux:deb:x86": "cross-env ARCH=x86 electron-builder -l=deb --ia32",
"pack:linux:deb:arm64": "cross-env ARCH=arm64 electron-builder -l=deb --arm64",
"pack:linux:rpm": "cross-env ARCH=x64 electron-builder -l=rpm --x64",
"pack:linux:pacman": "cross-env ARCH=x64 electron-builder -l=pacman --x64",
"pack:mac": "node build-config/pack.js && electron-builder -m=dmg",
"pack:dir": "node build-config/pack.js && electron-builder --dir",
"dev": "node build-config/runner-dev.js",
"clean:electron": "rimraf dist/electron",
"clean": "rimraf dist && rimraf build",
"build:main": "cross-env NODE_ENV=production webpack --config build-config/main/webpack.config.prod.js --progress --hide-modules",
"build:renderer": "cross-env NODE_ENV=production webpack --config build-config/renderer/webpack.config.prod.js --progress --hide-modules",
"build:renderer-lyric": "cross-env NODE_ENV=production webpack --config build-config/renderer-lyric/webpack.config.prod.js --progress --hide-modules",
"build:src": "node build-config/pack.js",
"build:main": "cross-env NODE_ENV=production webpack --config build-config/main/webpack.config.prod.js --progress",
"build:renderer": "cross-env NODE_ENV=production webpack --config build-config/renderer/webpack.config.prod.js --progress",
"build:renderer-lyric": "cross-env NODE_ENV=production webpack --config build-config/renderer-lyric/webpack.config.prod.js --progress",
"build": "npm run clean:electron && npm run build:main && npm run build:renderer && npm run build:renderer-lyric",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly src",
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly --fix src"
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly --fix src",
"dp": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://localhost:1081 npm run pack",
"up": "cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://localhost:1081 npm i"
},
"browserslist": [
"Electron 9.3.4"
"Electron 13.4.0"
],
"engines": {
"node": ">= 12"
"node": ">= 14"
},
"build": {
"appId": "cn.toside.music.desktop",
"directories": {
"buildResources": "./resources",
"output": "./build"
},
"files": [
"dist/electron/**/*"
],
"asar": {
"smartUnpack": false
},
"extraResources": [
"./licenses"
],
"win": {
"icon": "./resources/icons/256x256.ico",
"icon": "./resources/icons/icon.ico",
"legalTrademarks": "lyswhut",
"artifactName": "${productName} v${version} ${env.ARCH} ${env.TARGET}.${ext}"
},
"mac": {
"icon": "./resources/icons/512x512.icns",
"icon": "./resources/icons/icon.icns",
"category": "public.app-category.music"
},
"linux": {
@@ -132,12 +145,6 @@
"provider": "github",
"owner": "lyswhut",
"repo": "lx-music-desktop"
},
{
"package": "lx-music-desktop",
"repo": "lx-music-desktop",
"user": "lyswhut",
"provider": "bintray"
}
]
},
@@ -160,82 +167,92 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/core": "^7.16.7",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-modules-umd": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/plugin-transform-modules-umd": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.16.7",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-env": "^7.16.7",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-loader": "^8.2.3",
"babel-preset-minify": "^0.5.1",
"cfonts": "^2.9.1",
"chalk": "^4.1.0",
"browserslist": "^4.19.1",
"cfonts": "^2.10.0",
"chalk": "^4.1.2",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^6.4.1",
"core-js": "^3.8.3",
"copy-webpack-plugin": "^10.2.0",
"core-js": "^3.20.1",
"cross-env": "^7.0.3",
"css-loader": "^4.3.0",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^3.3.1",
"del": "^6.0.0",
"electron": "^9.4.2",
"electron-builder": "^22.9.1",
"electron": "^13.4.0",
"electron-builder": "^22.11.7",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.1.1",
"eslint": "^7.18.0",
"eslint-config-standard": "^14.1.1",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.4.31",
"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.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.2.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^4.5.1",
"less": "^3.13.1",
"less-loader": "^7.3.0",
"markdown-it": "^12.0.4",
"mini-css-extract-plugin": "^0.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-loader": "^4.2.0",
"postcss-pxtorem": "^5.1.1",
"pug": "^3.0.0",
"html-webpack-plugin": "^5.5.0",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"markdown-it": "^12.3.0",
"mini-css-extract-plugin": "^2.4.5",
"node-loader": "^2.0.0",
"postcss": "^8.4.5",
"postcss-loader": "^6.2.1",
"postcss-pxtorem": "^6.0.0",
"pug": "^3.0.2",
"pug-loader": "^2.4.0",
"pug-plain-loader": "^1.1.0",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"spinnies": "^0.5.1",
"stylus": "^0.54.8",
"stylus-loader": "^4.3.3",
"terser-webpack-plugin": "^4.2.3",
"svg-sprite-loader": "^6.0.11",
"svg-transform-loader": "^2.0.13",
"svgo-loader": "^3.0.0",
"terser-webpack-plugin": "^5.3.0",
"url-loader": "^4.1.1",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"vue-loader": "^17.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^3.11.2",
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^5.7.3"
"webpack-hot-middleware": "^2.25.1",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"crypto-js": "^4.0.0",
"dnscache": "^1.0.2",
"electron-log": "^4.3.1",
"electron-store": "^6.0.1",
"electron-updater": "^4.3.5",
"iconv-lite": "^0.6.2",
"image-size": "^0.9.3",
"js-htmlencode": "^0.3.0",
"lrc-file-parser": "^1.0.5",
"needle": "^2.6.0",
"node-id3": "^0.2.2",
"bufferutil": "^4.0.5",
"crypto-js": "^4.1.1",
"electron-log": "^4.4.4",
"electron-store": "^8.0.1",
"electron-updater": "^4.6.1",
"font-list": "github:lyswhut/node-font-list#4edbb1933b49a9bac1eedd63a31da16b487fe57d",
"http-terminator": "^3.0.4",
"iconv-lite": "^0.6.3",
"image-size": "^1.0.0",
"koa": "^2.13.4",
"long": "^5.2.0",
"mitt": "^3.0.0",
"needle": "^3.0.0",
"node-id3": "^0.2.3",
"request": "^2.88.2",
"vue": "^2.6.12",
"vue-i18n": "^8.22.4",
"vue-router": "^3.5.1",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0"
"socket.io": "^4.4.0",
"sortablejs": "^1.14.0",
"utf-8-validate": "^5.0.7",
"vue": "^3.2.26",
"vue-i18n": "^9.2.0-beta.26",
"vue-router": "^4.0.12",
"vuex": "^4.0.2"
}
}

View File

@@ -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,

View File

@@ -1,20 +1,40 @@
这算是一个大版本,对主窗口部分的代码逻辑做了较大改动,但由于界面的改动不大,所以没有更新大版本号。
虽然经过一个月的测试与问题修复,但可能仍然存在未发现的问题,若你发现某些界面异常、某些行为与旧版本存在差异等问题,欢迎反馈!
另外祝大家元旦快乐~
### 新增
- 搜索界面新增搜索状态的提示
- 新增“稍后播放”功能,可在歌曲列表右键菜单使用
- 新增“记住播放进度”功能的控制,该功能默认不再开启,可到播放设置-记住播放进度开启
- 播放详情页新增音量控制条
- 播放详情页新增桌面歌词切换按钮
- 新增将我的列表保存为TXT、CSV格式可以去设置-备份与恢复中使用注意此类格式的备份目前不支持恢复到LX Music中
- 新增根据歌曲名、歌手名等字段对列表自动排序的功能,可以在我的列表右击列表名弹出的菜单中使用
- 新增将播放与下载的歌词转换为繁体中文选项,默认关闭,可在设置-播放设置中开启
- 现在已允许进入临时播放列表,即:使用歌单详情页、排行榜名称右键菜单的“播放”按钮播放歌曲时,可右击播放封面进入此临时列表
- 播放详情页新增音频可视化功能(实验性)
- 我的列表新增拖动调整位置功能按住Ctrl键Mac上对应Command键的时候将进入“拖动模式”此时可以拖动列表的位置来调整顺序
### 优化
- 优化播放歌曲换源匹配
- 优化设置界面设置项的展示
- 优化列表性能,软件整体性能
- 调整Mac平台下的图标大小
- 同步功能添加对列表顺序调整的控制,确保手动调整位置后的列表与不同的电脑同步时,列表位置不会被还原
- 优化歌单详情、排行榜名右键的播放按钮的播放机制,现在不用等待整个列表(多页时)加载完成才能播放了
- 为播放详情页、桌面歌词添加延迟滚动,播放详情页略微减小已激活歌词的缩放大小及桌面歌词翻译大小
- 修改右边控制按钮为windows风格
- 更新了新年皮肤的背景与配色,欢迎体验~
### 修复
- 修复快速切换歌曲时, 会出现播放的歌曲和界面展示的歌曲不一致的问题
- 修复了一个由版本更新日志显示导致的潜在远程代码执行攻击漏洞该漏洞影响v1.6.1及之前的所有版本,请务必更新到最新版本
- 修复xm搜索源验证问题
- 修复kw源某些歌曲的歌词提取异常的问题
### 变更
- 现在使用繁体中文语言时将不再自动转换歌词,转换行为将由上面新增的转换开关控制
### 移除
- 移除我的列表右键菜单的“上移、下移列表”功能,调整改用新增的拖动功能去调整位置
### 其他
- 更新electron到9.4.2
- 升级vue到 3.x

View File

@@ -44,8 +44,7 @@ module.exports = async newVerNum => {
desc: version.desc,
})
version.version = newVerNum
version.desc = newChangeLog
// version.desc = newMDChangeLog.replace(/(?:^|(\n))#{1,6} (.+)\n/g, '$1$2').trim()
version.desc = newMDChangeLog.replace(/(?:^|(\n))#{1,6} (.+)\n/g, '$1$2').trim()
pkg.version = newVerNum
console.log(chalk.blue('new version: ') + chalk.green(newVerNum))

File diff suppressed because one or more lines are too long

BIN
resources/icons/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
resources/icons/16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
resources/icons/256x256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
resources/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

BIN
resources/icons/48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
resources/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
resources/icons/icon.icns Normal file

Binary file not shown.

BIN
resources/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
resources/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -51,6 +51,78 @@ module.exports = {
},
],
navigationUrlWhiteList: [
/^https:\/\/www\.xiami\.com/,
],
themes: [
{
id: 0,
name: '绿意盎然',
className: 'green',
},
{
id: 1,
name: '蓝田生玉',
className: 'blue',
},
{
id: 2,
name: '信口雌黄',
className: 'yellow',
},
{
id: 3,
name: '橙黄橘绿',
className: 'orange',
},
{
id: 4,
name: '热情似火',
className: 'red',
},
{
id: 10,
name: '粉装玉琢',
className: 'pink',
},
{
id: 5,
name: '重斤球紫',
className: 'purple',
},
{
id: 6,
name: '灰常美丽',
className: 'grey',
},
{
id: 11,
name: '青出于黑',
className: 'ming',
},
{
id: 12,
name: '青出于黑',
className: 'blue2',
},
{
id: 13,
name: '黑纸白字',
className: 'black',
},
{
id: 7,
name: '月里嫦娥',
className: 'mid_autumn',
},
{
id: 8,
name: '木叶之村',
className: 'naruto',
},
{
id: 9,
name: '新年快乐',
className: 'happy_new_year',
},
],
}

View File

@@ -2,7 +2,7 @@ const path = require('path')
const os = require('os')
const defaultSetting = {
version: '1.0.39',
version: '1.0.47',
player: {
togglePlayMethod: 'listLoop',
highQuality: false,
@@ -11,8 +11,11 @@ const defaultSetting = {
isMute: false,
mediaDeviceId: 'default',
isMediaDeviceRemovedStopPlay: false,
isShowLyricTransition: true,
isShowLyricTranslation: false,
isS2t: false, // 是否将歌词从简体转换为繁体
isPlayLxlrc: true,
isSavePlayTime: false,
audioVisualization: false,
},
desktopLyric: {
enable: false,
@@ -25,6 +28,7 @@ const defaultSetting = {
theme: 0,
isLockScreen: true,
style: {
font: '',
fontSize: 120,
opacity: 95,
isZoomActiveLrc: true,
@@ -33,8 +37,8 @@ const defaultSetting = {
list: {
isShowAlbumName: true,
isShowSource: true,
prevSelectListId: 'default',
isSaveScrollLocation: true,
addMusicLocationType: 'top',
},
download: {
enable: false,
@@ -42,8 +46,10 @@ const defaultSetting = {
fileName: '歌名 - 歌手',
maxDownloadNum: 3,
isDownloadLrc: false,
lrcFormat: 'utf8',
isEmbedPic: true,
isEmbedLyric: false,
isUseOtherSource: false,
},
leaderboard: {
source: 'kw',
@@ -82,6 +88,10 @@ const defaultSetting = {
isToTray: false,
themeId: 0,
},
sync: {
enable: false,
port: '23332',
},
windowSizeId: 2,
themeId: 0,
langId: null,
@@ -100,7 +110,10 @@ const overwriteSetting = {
}
// 使用新年皮肤
if (new Date().getMonth() < 2) defaultSetting.themeId = 9
if (new Date().getMonth() < 2) {
defaultSetting.themeId = 9
defaultSetting.desktopLyric.theme = 3
}
exports.defaultSetting = defaultSetting

View File

@@ -2,11 +2,17 @@ const { ipcMain, ipcRenderer } = require('electron')
const names = require('./ipcNames')
exports.mainOn = (event, callback) => {
ipcMain.on(event, callback)
exports.mainOn = (name, callback) => {
ipcMain.on(name, callback)
}
exports.mainOnce = (event, callback) => {
ipcMain.once(event, callback)
exports.mainOnce = (name, callback) => {
ipcMain.once(name, callback)
}
exports.mainOff = (name, callback) => {
ipcMain.removeListener(name, callback)
}
exports.mainOffAll = name => {
ipcMain.removeAllListeners(name)
}
exports.mainHandle = (name, callback) => {
@@ -15,6 +21,9 @@ exports.mainHandle = (name, callback) => {
exports.mainHandleOnce = (name, callback) => {
ipcMain.handleOnce(name, callback)
}
exports.mainHandleRemove = name => {
ipcMain.removeListener(name)
}
exports.mainSend = (window, name, params) => {
window.webContents.send(name, params)
@@ -33,5 +42,11 @@ exports.rendererOn = (name, callback) => {
exports.rendererOnce = (name, callback) => {
ipcRenderer.once(name, callback)
}
exports.rendererOff = (name, callback) => {
ipcRenderer.removeListener(name, callback)
}
exports.rendererOffAll = name => {
ipcRenderer.removeAllListeners(name)
}
exports.NAMES = names

View File

@@ -8,6 +8,8 @@ const names = {
clear_cache: 'clear_cache',
get_cache_size: 'get_cache_size',
get_env_params: 'get_env_params',
wait: 'wait',
wait_cancel: 'wait_cancel',
set_music_meta: 'set_music_meta',
progress: 'progress',
@@ -22,6 +24,7 @@ const names = {
set_app_setting: 'set_app_setting',
set_window_size: 'set_window_size',
show_save_dialog: 'show_save_dialog',
get_system_fonts: 'get_system_fonts',
handle_request: 'handle_request',
cancel_request: 'cancel_request',
@@ -32,6 +35,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',
@@ -50,6 +55,30 @@ const names = {
get_data: 'get_data',
save_data: 'save_data',
get_hot_key: 'get_hot_key',
import_user_api: 'import_user_api',
remove_user_api: 'remove_user_api',
set_user_api: 'set_user_api',
get_user_api_list: 'get_user_api_list',
request_user_api: 'request_user_api',
request_user_api_cancel: 'request_user_api_cancel',
get_user_api_status: 'get_user_api_status',
user_api_status: 'user_api_status',
get_lyric: 'get_lyric',
save_lyric: 'save_lyric',
clear_lyric: 'clear_lyric',
get_music_url: 'get_music_url',
save_music_url: 'save_music_url',
clear_music_url: 'clear_music_url',
sync_enable: 'sync_enable',
sync_status: 'sync_status',
sync_get_status: 'sync_get_status',
sync_generate_code: 'sync_generate_code',
sync_action_list: 'sync_action_list',
sync_list: 'sync_list',
},
winLyric: {
close: 'close',

42
src/common/store.js Normal file
View File

@@ -0,0 +1,42 @@
const Store = require('electron-store')
const { dialog, app, shell } = require('electron')
const path = require('path')
const fs = require('fs')
const log = require('electron-log')
const stores = {}
/**
* 获取 Store 对象
* @param {*} name store 名
* @param {*} isIgnoredError 是否忽略错误
* @param {*} isShowErrorAlert 是否显示错误弹窗
* @returns Store
*/
module.exports = (name, isIgnoredError = true, isShowErrorAlert = true) => {
if (stores[name]) return stores[name]
let store
try {
store = stores[name] = new Store({ name, clearInvalidConfig: false })
} catch (error) {
log.error(error)
if (!isIgnoredError) throw error
const backPath = path.join(app.getPath('userData'), name + '.json.bak')
fs.copyFileSync(path.join(app.getPath('userData'), name + '.json'), backPath)
if (isShowErrorAlert) {
dialog.showMessageBoxSync({
type: 'error',
message: name + ' data load error',
detail: `We have helped you back up the old ${name} file to: ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`,
})
shell.showItemInFolder(backPath)
}
store = new Store({ name, clearInvalidConfig: true })
}
return store
}

View File

@@ -1,11 +1,8 @@
const log = require('electron-log')
const Store = require('electron-store')
const { defaultSetting, overwriteSetting } = require('./defaultSetting')
const apiSource = require('../renderer/utils/music/api-source-info')
// const apiSource = require('../renderer/utils/music/api-source-info')
const getStore = require('./store')
const defaultHotKey = require('./defaultHotKey')
const { dialog, app } = require('electron')
const path = require('path')
const fs = require('fs')
exports.isLinux = process.platform == 'linux'
exports.isWin = process.platform == 'win32'
@@ -115,10 +112,10 @@ exports.mergeSetting = (setting, version) => {
setting = defaultSettingCopy
}
if (!apiSource.some(api => api.id === setting.apiSource && !api.disabled)) {
let api = apiSource.find(api => !api.disabled)
if (api) setting.apiSource = api.id
}
// if (!apiSource.some(api => api.id === setting.apiSource && !api.disabled)) {
// let api = apiSource.find(api => !api.disabled)
// if (api) setting.apiSource = api.id
// }
return { setting, version: defaultVersion }
}
@@ -126,30 +123,13 @@ exports.mergeSetting = (setting, version) => {
/**
* 初始化设置
* @param {*} setting
* @param {*} isShowErrorAlert
*/
exports.initSetting = () => {
let electronStore_list
try {
electronStore_list = new Store({
name: 'playList',
clearInvalidConfig: false,
})
} catch (error) {
log.error(error)
const backPath = path.join(app.getPath('userData'), 'playList.json.bak')
fs.copyFileSync(path.join(app.getPath('userData'), 'playList.json'), backPath)
dialog.showMessageBoxSync({
type: 'error',
message: 'Playlist data loading error',
detail: `We have helped you back up the old list file to ${backPath}\nYou can try to repair and restore it manually\n\nError detail: ${error.message}`,
})
electronStore_list = new Store({
name: 'playList',
})
}
const electronStore_config = new Store({
name: 'config',
})
exports.initSetting = isShowErrorAlert => {
const electronStore_list = getStore('playList', true, isShowErrorAlert)
const electronStore_config = getStore('config')
const electronStore_downloadList = getStore('downloadList')
let setting = electronStore_config.get('setting')
if (setting) {
let version = electronStore_config.get('version')
@@ -165,7 +145,7 @@ exports.initSetting = () => {
}
const downloadList = electronStore_config.get('download')
if (downloadList) {
if (downloadList.list) electronStore_list.set('downloadList', downloadList.list)
if (downloadList.list) electronStore_downloadList.set('list', downloadList.list)
electronStore_config.delete('download')
}
}
@@ -173,12 +153,22 @@ exports.initSetting = () => {
// 迁移列表滚动位置设置 ~0.18.3
if (setting.list.scroll) {
let scroll = setting.list.scroll
electronStore_list.set('defaultList.location', scroll.locations.default || 0)
electronStore_list.set('loveList.location', scroll.locations.love || 0)
electronStore_config.delete('setting.list.scroll')
electronStore_config.set('setting.list.isSaveScrollLocation', scroll.enable)
delete setting.list.scroll
}
if (setting.player.isShowLyricTransition != null) { // 修正拼写问题 v1.8.2 及以前
setting.player.isShowLyricTranslation = setting.player.isShowLyricTransition
delete setting.player.isShowLyricTransition
}
}
// 从我的列表分离下载列表 v1.7.0 后
let downloadList = electronStore_list.get('downloadList')
if (downloadList) {
electronStore_downloadList.set('list', downloadList)
electronStore_list.delete('downloadList')
}
const { version: settingVersion, setting: newSetting } = exports.mergeSetting(setting, electronStore_config.get('version'))
@@ -187,8 +177,7 @@ exports.initSetting = () => {
if (!newSetting.leaderboard.tabId.includes('__')) newSetting.leaderboard.tabId = 'kw__16'
// newSetting.controlBtnPosition = 'right'
electronStore_config.set('version', settingVersion)
electronStore_config.set('setting', newSetting)
electronStore_config.set({ version: settingVersion, setting: newSetting })
return { version: settingVersion, setting: newSetting }
}
@@ -196,9 +185,7 @@ exports.initSetting = () => {
* 初始化快捷键设置
*/
exports.initHotKey = () => {
const electronStore_hotKey = new Store({
name: 'hotKey',
})
const electronStore_hotKey = getStore('hotKey')
let localConfig = electronStore_hotKey.get('local')
if (!localConfig) {

407
src/lang/en-us.json Normal file
View File

@@ -0,0 +1,407 @@
{
"action": "Manage",
"agree": "Accept",
"audio_visualization": "Audio visualization (experimental)",
"back": "Back",
"cancel_button_text": "Cancel",
"close": "Close",
"comment__hot_load_error": "Hot comments failed to load, click to try to reload",
"comment__hot_loading": "Hot comments are loading",
"comment__hot_title": "Hot Comment",
"comment__new_load_error": "The latest comment failed to load, click to try to reload",
"comment__new_loading": "Latest comments are loading",
"comment__new_title": "Latest comment",
"comment__no_content": "No comments yet",
"comment__refresh": "Refresh comments",
"comment__show": "Song comments",
"comment__title": "{name} comment",
"confirm_button_text": "Yes",
"copy_tip": " (Click to copy)",
"date_format_hour": "{num} hours ago",
"date_format_minute": "{num} minutes ago",
"date_format_second": "{num} seconds ago",
"default": "Default",
"default_list": "Recently Played",
"desktop_lyric__back": "Back",
"desktop_lyric__close": "Close",
"desktop_lyric__font_decrease": "Reduce font size (Right click to fine-tune)",
"desktop_lyric__font_increase": "Increase font size (Right click to fine-tune)",
"desktop_lyric__lock": "Lock Lyrics",
"desktop_lyric__lrc_active_zoom_off": "Unzoom the currently playing lyrics",
"desktop_lyric__lrc_active_zoom_on": "Zoom the currently playing lyrics",
"desktop_lyric__opactiy_decrease": "Increase Transparency (Right click to fine-tune)",
"desktop_lyric__opactiy_increase": "Decrease Transparency (Right click to fine-tune)",
"desktop_lyric__theme": "Theme Color",
"desktop_lyric__unlock": "Unlock Lyrics",
"desktop_lyric__win_top_off": "Cancel the top lyrics interface",
"desktop_lyric__win_top_on": "Top lyrics interface",
"download": "Downloads",
"download__all": "All Tasks",
"download__error": "Error",
"download__finished": "Download complete",
"download__high_quality": "High Quality",
"download__lossless": "Lossless",
"download__multiple_tip": "{len} song selected",
"download__multiple_tip2": "Select preferred download quality",
"download__normal": "Normal",
"download__not_available_tip": "The audio quality is not available",
"download__paused": "Paused",
"download__progress": "Progress",
"download__quality": "Quality",
"download__runing": "Downloading",
"download__status": "Status",
"export": "Export",
"history_clear": "Clear History",
"history_remove": "Right click to remove this entry",
"history_search": "History Searches",
"import": "Import",
"leaderboard": "Charts",
"list__add_to": "Add to ...",
"list__collect": "Collect",
"list__copy_name": "Copy name",
"list__download": "Download",
"list__export_part_desc": "Choose where to save the list file",
"list__file": "Locate the file",
"list__import_part_button_cancel": "Don't",
"list__import_part_button_confirm": "Overwrite",
"list__import_part_confirm": "The imported list ({importName}) has the same ID as the local list ({localName}). Do you want to overwrite the local list?",
"list__import_part_desc": "Select List File",
"list__load_failed": "Ah, the loading failed 😭",
"list__loading": "List loading...⏳",
"list__move_to": "Move to ...",
"list__movedown": "Movedown",
"list__moveup": "Move up",
"list__new_list_btn": "New List",
"list__new_list_input": "New list...",
"list__pause": "Pause Task",
"list__play": "Play",
"list__play_later": "Play later",
"list__remove": "Remove",
"list__remove_tip": "Do you really want to remove {name}?",
"list__remove_tip_button": "Yes, that's right",
"list__rename": "Rename",
"list__search": "Search",
"list__sort": "Adjust position",
"list__source_detail": "Song Page",
"list__start": "Start Task",
"list__sync": "Update",
"list_add__btn_title": "Add the song(s) to {name}",
"list_add__multiple_btn_title": "Add these song(s) to {name}",
"list_add__multiple_title_add": "Add the selected {num} song(s) to ...",
"list_add__multiple_title_move": "Move the selected {num} song(s) to ...",
"list_add__title_first_add": "Add",
"list_add__title_first_move": "Move",
"list_add__title_last": "to...",
"list_sort_modal_by_album": "Album name",
"list_sort_modal_by_down": "Descending",
"list_sort_modal_by_field": "Sort field",
"list_sort_modal_by_name": "Song name",
"list_sort_modal_by_singer": "Singer name",
"list_sort_modal_by_source": "Song source",
"list_sort_modal_by_time": "Duration",
"list_sort_modal_by_type": "Sort categories",
"list_sort_modal_by_up": "Ascending",
"list_sort_modal_tip_confirm": "Are you sure you want to do this?",
"lists__duplicate": "Duplicate song",
"lists__export": "Export",
"lists__export_part_desc": "Choose where to save the list file",
"lists__import": "Import",
"lists__import_part_button_cancel": "No",
"lists__import_part_button_confirm": "Overwrite",
"lists__import_part_confirm": "The imported list ({importName}) has the same ID as the local list ({localName}). Do you overwrite the local list?",
"lists__import_part_desc": "Select list file",
"lists__new_list_btn": "Create list",
"lists__new_list_input": "New list...",
"lists__remove": "Remove",
"lists__remove_tip": "Do you really want to remove {name}?",
"lists__remove_tip_button": "Yes, that's right",
"lists__rename": "Rename",
"lists__sort_list": "Sort songs",
"lists__sync": "Update",
"load_list_file_error_detail": "We have helped you back up the old list file to {path}\nIt is stored in JSON format, you can try to repair and restore it manually\n\nError details: {detail}",
"load_list_file_error_title": "Error loading playlist data",
"loding_list": "Loading...",
"love_list": "Favorites",
"lyric__load_error": "Failed to get lyrics",
"lyric__select": "Lyric text selection",
"min": "Minimize",
"music_album": "Album",
"music_duplicate": "Duplicate song",
"music_name": "Name",
"music_singer": "Artist",
"music_sort__btn_cancel": "Cancel",
"music_sort__btn_confirm": "Confirm",
"music_sort__input_tip": "Please input which position you want to adjust to",
"music_sort__title": "Adjust the position of {name} to:",
"music_sort__title_multiple": "Adjust the position of the selected {num} songs to:",
"music_time": "Length",
"my_list": "Your Library",
"no_item": "Nothing's here...",
"not_agree": "Not accept",
"pagination__next": "Next page",
"pagination__page": "Page {num}",
"pagination__prev": "Previous page",
"player__add_music_to": "Add the current song to...",
"player__buffering": "Buffering...",
"player__desktop_lyric_lock": "Right click to lock lyrics",
"player__desktop_lyric_off": "Close Desktop Lyrics",
"player__desktop_lyric_on": "Open Desktop Lyrics",
"player__desktop_lyric_unlock": "Right click to unlock lyrics",
"player__end": "Stopped",
"player__error": "Error loading music. Switch to next song after 5 seconds",
"player__geting_url": "Getting music link...",
"player__hide_detail_tip": "Hide detail page (Right-click in the view to quickly hide the details page)",
"player__loading": "Music loading...",
"player__music_album": "Album: ",
"player__music_name": "Name: ",
"player__music_singer": "Artist: ",
"player__next": "Next",
"player__pause": "Pause",
"player__pic_tip": "Right click to locate the currently playing song in \"My List\"",
"player__play": "Play",
"player__play_toggle_mode_list": "Play in order",
"player__play_toggle_mode_list_loop": "List Loop",
"player__play_toggle_mode_off": "Disable",
"player__play_toggle_mode_random": "List Random",
"player__play_toggle_mode_single_loop": "Single Loop",
"player__playing": "Now playing...",
"player__prev": "Prev",
"player__refresh_url": "Music URL expired, refreshing...",
"player__stop": "Paused",
"player__volume": "Volume: ",
"search": "Search",
"search__hot_search": "Top Searches",
"search__welcome": "Search what I want to 😉",
"setting": "Settings",
"setting__about": "About lx-music-desktop",
"setting__backup": "Backup and restore",
"setting__backup_all": "All data (list data and setting data)",
"setting__backup_all_export": "Export",
"setting__backup_all_export_desc": "Select the backup to...",
"setting__backup_all_import": "Import",
"setting__backup_all_import_desc": "Select a backup file",
"setting__backup_other": "Other backup formats (recovery of such backup files is not currently supported)",
"setting__backup_other_export_dir": "Choose where to save the file",
"setting__backup_other_export_list_csv": "Export list in CSV format",
"setting__backup_other_export_list_text": "Export list in TXT format",
"setting__backup_other_export_list_text_confirm": "Do you want to merge all the lists into one file?",
"setting__backup_part": "Partial data (list data includes audition list, favorite list, user-defined list, setting data does not include shortcut key settings)",
"setting__backup_part_export_list": "Export lists",
"setting__backup_part_export_list_desc": "Save the list to...",
"setting__backup_part_export_setting": "Export settings",
"setting__backup_part_export_setting_desc": "Save the list to...",
"setting__backup_part_import_list": "Import lists",
"setting__backup_part_import_list_desc": "Select a list backup",
"setting__backup_part_import_setting": "Import settings",
"setting__backup_part_import_setting_desc": "Select the Settings file",
"setting__basic": "General",
"setting__basic_animation": "Random pop-up animation",
"setting__basic_control_btn_position": "Control Button Position",
"setting__basic_control_btn_position_left": "Left",
"setting__basic_control_btn_position_right": "Right",
"setting__basic_lang": "Language",
"setting__basic_lang_title": "The language displayed in the software",
"setting__basic_show_animation": "Show switching animation",
"setting__basic_source": "Music source",
"setting__basic_source_status_failed": "Initialization failed",
"setting__basic_source_status_initing": "Initializing",
"setting__basic_source_status_success": "Initialization successful",
"setting__basic_source_temp": "Temporary API (some features not available; workaround if Test API unavailable)",
"setting__basic_source_test": "Test API (Available for most software features)",
"setting__basic_source_title": "Choose a music source",
"setting__basic_source_user_api_btn": "Custom Source Management",
"setting__basic_sourcename": "Source name",
"setting__basic_sourcename_alias": "Aliases",
"setting__basic_sourcename_real": "Original",
"setting__basic_sourcename_title": "Select the name of music source",
"setting__basic_theme": "Theme",
"setting__basic_to_tray": "Do not exit the software when closing the software and minimize it to the system tray",
"setting__basic_window_size": "Window size",
"setting__basic_window_size_big": "Large",
"setting__basic_window_size_huge": "Huge",
"setting__basic_window_size_larger": "Larger",
"setting__basic_window_size_medium": "Medium",
"setting__basic_window_size_oversized": "Oversized",
"setting__basic_window_size_small": "Small",
"setting__basic_window_size_smaller": "Smaller",
"setting__basic_window_size_title": "Set the window size",
"setting__click_copy": "Click to copy",
"setting__click_open": "Click to open",
"setting__desktop_lyric": "Desktop Lyric Settings",
"setting__desktop_lyric_always_on_top": "Make the lyrics always above other windows",
"setting__desktop_lyric_enable": "Display lyrics",
"setting__desktop_lyric_font": "Lyric font",
"setting__desktop_lyric_font_default": "Default",
"setting__desktop_lyric_lock": "Lock lyrics",
"setting__desktop_lyric_lock_screen": "It is not allowed to drag the lyrics window out of the main screen",
"setting__download": "Download",
"setting__download_data_embed": "Whether to embed the following content in the audio file",
"setting__download_embed_lyric": "Embedding lyric",
"setting__download_embed_pic": "Embedding cover",
"setting__download_enable": "Whether to enable download function",
"setting__download_lyric": "Lyrics download",
"setting__download_lyric_format": "Downloaded lyrics file encoding format",
"setting__download_lyric_format_gbk": "GBK (Try to select this format when Chinese garbled characters appear on some devices)",
"setting__download_lyric_format_utf8": "UTF-8",
"setting__download_lyric_title": "Select whether to download the lyrics file",
"setting__download_name": "Music file naming",
"setting__download_name1": "Title - Artist",
"setting__download_name2": "Artist - Title",
"setting__download_name3": "Title only",
"setting__download_name_title": "Select the music naming method for downloading",
"setting__download_path": "Download path",
"setting__download_path_change_btn": "Change",
"setting__download_path_label": "Current: ",
"setting__download_path_open_label": "Click to open this path",
"setting__download_path_title": "Define the path to downloading",
"setting__download_select_save_path": "Select the save path",
"setting__download_use_other_source": "Auto source download",
"setting__download_use_other_source_tip": "When the song cannot be downloaded from the original source, try to switch to another source to download. Note: This function does not 100% guarantee that the version of the song after changing the source is consistent with the original version",
"setting__hot_key": "Shortcut Key Settings",
"setting__hot_key_common_focus_search_input": "Focus Search Box",
"setting__hot_key_common_min": "Minimize the program",
"setting__hot_key_common_toggle_close": "Quit Program",
"setting__hot_key_common_toggle_hide": "Show/Hide Program",
"setting__hot_key_common_toggle_min": "Minimize/Restore Program",
"setting__hot_key_desktop_lyric_toggle_always_top": "Top Desktop Lyrics Switch",
"setting__hot_key_desktop_lyric_toggle_lock": "Desktop Lyric Lock Switch",
"setting__hot_key_desktop_lyric_toggle_visible": "Turn on/off desktop lyrics",
"setting__hot_key_global_title": "Global Shortcut Key",
"setting__hot_key_local_title": "Shortcut Keys in Software",
"setting__hot_key_player_next": "Next Song",
"setting__hot_key_player_prev": "Previous Song",
"setting__hot_key_player_toggle_play": "Play/Pause Control",
"setting__hot_key_player_volume_down": "Reduce Volume",
"setting__hot_key_player_volume_mute": "Mute Switch",
"setting__hot_key_player_volume_up": "Increase Volume",
"setting__hot_key_tip_input": "Please enter a new key",
"setting__hot_key_unset_input": "Not Set",
"setting__is_enable": "Enabled",
"setting__is_show": "Showed",
"setting__list": "List",
"setting__list_add_music_location_type": "Position when adding a song to the list",
"setting__list_add_music_location_type_bottom": "Bottom",
"setting__list_add_music_location_type_top": "Top",
"setting__list_scroll": "Remember the position of the scroll bar of the playlist (only valid for my music classification)",
"setting__list_source": "Show song source (only valid for my music category)",
"setting__network": "Network",
"setting__network_proxy_host": "Host",
"setting__network_proxy_password": "Password",
"setting__network_proxy_port": "Port",
"setting__network_proxy_title": "HTTP Proxy (False setting would block Internet connections)",
"setting__network_proxy_username": "Username",
"setting__odc": "Auto clear",
"setting__odc_clear_search_input": "Clear the search box when you are not searching",
"setting__odc_clear_search_list": "Clear the search list when you are not searching",
"setting__other": "Extras",
"setting__other_play_list_cache": "List cache management",
"setting__other_play_list_cache_clear_btn": "Clear list cache information",
"setting__other_play_list_cache_tip": "The cached song links and playback sources in my list need to be re-acquired when playing or downloading songs after cleaning. Do not clean up if there are no issues related to song playback",
"setting__other_play_list_cache_tip_confirm": "In my list, the cached song links and play alternative sources need to be re-obtained when playing and downloading songs after cleaning. Do not clean up if there are no issues related to song playback. Are you sure to clean up?",
"setting__other_resource_cache": "Resource cache management",
"setting__other_resource_cache_clear_btn": "Clear resource cache",
"setting__other_resource_cache_confirm": "I want to clear",
"setting__other_resource_cache_label": "The software has used cache size: ",
"setting__other_resource_cache_tip": "Picture, audio, and other caches. After cleaning, resources such as pictures will need to be downloaded again. It is not recommended to clean up. The software will dynamically manage the cache size according to the disk space.",
"setting__other_resource_cache_tip_confirm": "Involving the cache of pictures, audios, etc., the pictures and other resources will need to be downloaded again after cleaning. It is not recommended to clean up. The software will dynamically manage the cache size according to the disk space. Do you still need to clean up?",
"setting__other_tray_theme": "Tray Icon Style",
"setting__other_tray_theme_black": "Black Color",
"setting__other_tray_theme_native": "White",
"setting__other_tray_theme_origin": "Primary Color",
"setting__play": "Play",
"setting__play_lyric_lxlrc": "Use Karaoke-style lyrics playback (if supported)",
"setting__play_lyric_s2t": "Convert the playing and downloading lyrics to Traditional Chinese",
"setting__play_lyric_transition": "Show lyrics translation",
"setting__play_mediaDevice": "Audio output",
"setting__play_mediaDevice_remove_stop_play": "Pause the song when the current sound output device is changed",
"setting__play_mediaDevice_title": "Select a media device for audio output",
"setting__play_quality": "Play 320K quality songs first (if supported)",
"setting__play_save_play_time": "Remember playback progress",
"setting__play_task_bar": "Show playing progress on the taskbar",
"setting__search": "Search",
"setting__search_focus_search_box": "Automatically focus the search box on startup",
"setting__search_history": "Search history",
"setting__search_hot": "Top Searches",
"setting__sync": "Data synchronization",
"setting__sync_address": "Synchronization service address: {address}",
"setting__sync_auth_code": "Connection code: {code}",
"setting__sync_device": "Connected devices: {devices}",
"setting__sync_enable": "Enable the synchronization function (because the data is transmitted in clear text, please use it under a trusted network)",
"setting__sync_port": "Sync port settings",
"setting__sync_port_tip": "Please enter the synchronization service port number",
"setting__sync_refresh_code": "Refresh the connection code",
"setting__sync_tip": "For how to use it, please see the \"Sync function\" section of the FAQ",
"setting__update": "Update",
"setting__update_checking": "Checking for updates...",
"setting__update_current_label": "Current version: ",
"setting__update_downloading": "Update is found and being downloaded...⏳",
"setting__update_init": "Processing update...",
"setting__update_latest": "The software is up-to-date, enjoy yourself!🥂",
"setting__update_latest_label": "Latest version: ",
"setting__update_open_version_modal_btn": "Open the update window🚀",
"setting__update_progress": "Download progress: ",
"setting__update_unknown": "Unknown",
"song_list": "Playlists",
"songlist__import_input_tip": "Enter songlist link or songlist ID",
"songlist__import_input_tip_1": "Cross-source playlists are not supported, please confirm whether the playlist to be opened corresponds to the current playlist source",
"songlist__import_input_tip_2": "If you encounter a link to a playlist that cannot be opened, welcome feedback",
"songlist__import_input_tip_3": "Kugou source does not support opening with playlist ID, but supports Kugou code opening",
"songlist__open_list": "open {name} playlist",
"source_alias_all": "Aggregated",
"source_alias_bd": "BD Music",
"source_alias_kg": "KG Music",
"source_alias_kw": "KW Music",
"source_alias_mg": "MG Music",
"source_alias_tx": "TX Music",
"source_alias_wy": "WY Music",
"source_alias_xm": "XM Music",
"source_all": "Aggregated",
"source_bd": "Baidu",
"source_kg": "Kugou",
"source_kw": "Kuwo",
"source_mg": "Migu",
"source_tx": "Tencent",
"source_wy": "Netease",
"source_xm": "Xiami",
"sync__merge_btn_local_remote": "Local list merge remote list",
"sync__merge_btn_remote_local": "Remote list merge local list",
"sync__merge_label": "Merge",
"sync__merge_tip": "Merge:",
"sync__merge_tip_desc": "Merge the two lists together, the same song will be removed (the song of the merged person is removed), and different songs will be added.",
"sync__other_label": "Other",
"sync__other_tip": "Other: ",
"sync__other_tip_desc": "\"Only use real-time synchronization function\" will not modify the lists of both parties, only real-time synchronization operations; \"Cancel synchronization\" will directly disconnect the two parties.",
"sync__overwrite": "Full coverage",
"sync__overwrite_btn_cancel": "Cancel sync",
"sync__overwrite_btn_local_remote": "Local list Overwrite remote list",
"sync__overwrite_btn_none": "Only use real-time synchronization",
"sync__overwrite_btn_remote_local": "Remote list Overwrite local list",
"sync__overwrite_label": "Cover",
"sync__overwrite_tip": "Cover: ",
"sync__overwrite_tip_desc": "The list with the same ID of the covered person and the covered list will be deleted and replaced with the list of the covered person (lists with different list IDs will be merged together). If you check Complete coverage, all lists of the covered person will be moved. \nDivide, and then replace with a list of overriders.",
"sync__title": "Choose how to synchronize the list with {name}",
"tag__high_quality": "HQ",
"tag__lossless": "SQ",
"theme_black": "Black",
"theme_blue": "Blue",
"theme_blue2": "Purple Blue",
"theme_green": "Green",
"theme_grey": "Grey",
"theme_happy_new_year": "New Year",
"theme_mid_autumn": "Mid-Autumn",
"theme_ming": "Ming",
"theme_naruto": "Naruto",
"theme_orange": "Orange",
"theme_pink": "Pink",
"theme_purple": "Purple",
"theme_red": "Red",
"theme_yellow": "Yellow",
"user_api__btn_export": "Export",
"user_api__btn_import": "Import",
"user_api__btn_remove": "Remove",
"user_api__import_file": "Select music API script file",
"user_api__noitem": "There is nothing here...😲",
"user_api__note": "Tip: Although we have isolated the script's running environment as much as possible, importing scripts containing malicious behaviors may still affect your system. Please import them carefully.",
"user_api__readme": "Source writing instructions: ",
"user_api__title": "Custom Source Management"
}

42
src/lang/index.js Normal file
View File

@@ -0,0 +1,42 @@
import zh_cn from './zh-cn.json'
import zh_tw from './zh-tw.json'
import en_us from './en-us.json'
const langs = [
{
name: '简体中文',
locale: 'zh-cn',
alternate: 'zh-hans',
country: 'cn',
fallback: true,
message: zh_cn,
},
{
name: '繁体中文',
locale: 'zh-tw',
alternate: 'zh-hk',
country: 'cn',
message: zh_tw,
},
{
name: 'English',
locale: 'en-us',
country: 'us',
message: en_us,
},
]
const langList = []
const messages = {}
langs.forEach(item => {
langList.push({
name: item.name,
locale: item.locale,
})
messages[item.locale] = item.message
})
export {
langList,
messages,
}

407
src/lang/zh-cn.json Normal file
View File

@@ -0,0 +1,407 @@
{
"action": "操作",
"agree": "接受",
"audio_visualization": "音频可视化(实验性)",
"back": "返回",
"cancel_button_text": "我不",
"close": "关闭",
"comment__hot_load_error": "热门评论加载失败,点击尝试重新加载",
"comment__hot_loading": "热门评论加载中",
"comment__hot_title": "热门评论",
"comment__new_load_error": "最新评论加载失败,点击尝试重新加载",
"comment__new_loading": "最新评论加载中",
"comment__new_title": "最新评论",
"comment__no_content": "暂无评论",
"comment__refresh": "刷新评论",
"comment__show": "歌曲评论",
"comment__title": "{name} 的评论",
"confirm_button_text": "是的",
"copy_tip": "(点击复制)",
"date_format_hour": "{num}小时前",
"date_format_minute": "{num}分钟前",
"date_format_second": "{num}秒前",
"default": "默认",
"default_list": "试听列表",
"desktop_lyric__back": "返回",
"desktop_lyric__close": "关闭",
"desktop_lyric__font_decrease": "减小字体大小(右击可微调)",
"desktop_lyric__font_increase": "增加字体大小(右击可微调)",
"desktop_lyric__lock": "锁定歌词",
"desktop_lyric__lrc_active_zoom_off": "取消缩放当前播放的歌词",
"desktop_lyric__lrc_active_zoom_on": "缩放当前播放的歌词",
"desktop_lyric__opactiy_decrease": "增加透明度(右击可微调)",
"desktop_lyric__opactiy_increase": "减小透明度(右击可微调)",
"desktop_lyric__theme": "主题配色",
"desktop_lyric__unlock": "解锁歌词",
"desktop_lyric__win_top_off": "取消置顶歌词界面",
"desktop_lyric__win_top_on": "置顶歌词界面",
"download": "下载",
"download__all": "全部任务",
"download__error": "出错",
"download__finished": "下载完成",
"download__high_quality": "高品音质",
"download__lossless": "无损音质",
"download__multiple_tip": "已选择 {len} 首歌曲",
"download__multiple_tip2": "请选择要优先下载的音质",
"download__normal": "普通音质",
"download__not_available_tip": "该音质不可用",
"download__paused": "已暂停",
"download__progress": "进度",
"download__quality": "品质",
"download__runing": "正在下载",
"download__status": "状态",
"export": "导出",
"history_clear": "清空搜索历史",
"history_remove": "右击移除该历史",
"history_search": "历史搜索",
"import": "导入",
"leaderboard": "排行榜",
"list__add_to": "添加到...",
"list__collect": "收藏",
"list__copy_name": "复制歌曲名",
"list__download": "下载",
"list__export_part_desc": "选择列表文件保存位置",
"list__file": "定位文件",
"list__import_part_button_cancel": "不要啊",
"list__import_part_button_confirm": "覆盖掉",
"list__import_part_confirm": "导入的列表({importName})与本地列表({localName}的ID相同是否覆盖本地列表",
"list__import_part_desc": "选择列表文件",
"list__load_failed": "啊,加载失败了😭",
"list__loading": "列表加载中...⏳",
"list__move_to": "移动到...",
"list__movedown": "下移",
"list__moveup": "上移",
"list__new_list_btn": "新建列表",
"list__new_list_input": "新列表...",
"list__pause": "暂停任务",
"list__play": "播放",
"list__play_later": "稍后播放",
"list__remove": "删除",
"list__remove_tip": "你真的想要移除 {name} 吗?",
"list__remove_tip_button": "是的 没错",
"list__rename": "重命名",
"list__search": "搜索",
"list__sort": "调整位置",
"list__source_detail": "歌曲详情页",
"list__start": "开始任务",
"list__sync": "更新",
"list_add__btn_title": "把该歌曲添加到 {name}",
"list_add__multiple_btn_title": "把这些歌曲添加到 {name}",
"list_add__multiple_title_add": "添加已选的 {num} 首歌曲到...",
"list_add__multiple_title_move": "移动已选的 {num} 首歌曲到...",
"list_add__title_first_add": "添加",
"list_add__title_first_move": "移动",
"list_add__title_last": "到...",
"list_sort_modal_by_album": "专辑名",
"list_sort_modal_by_down": "降序",
"list_sort_modal_by_field": "排序字段",
"list_sort_modal_by_name": "歌曲名",
"list_sort_modal_by_singer": "歌手名",
"list_sort_modal_by_source": "歌曲源",
"list_sort_modal_by_time": "时长",
"list_sort_modal_by_type": "排序类别",
"list_sort_modal_by_up": "升序",
"list_sort_modal_tip_confirm": "你确定要这么做吗?",
"lists__duplicate": "重复歌曲",
"lists__export": "导出",
"lists__export_part_desc": "选择列表文件保存位置",
"lists__import": "导入",
"lists__import_part_button_cancel": "不要啊",
"lists__import_part_button_confirm": "覆盖掉",
"lists__import_part_confirm": "导入的列表({importName})与本地列表({localName}的ID相同是否覆盖本地列表",
"lists__import_part_desc": "选择列表文件",
"lists__new_list_btn": "新建列表",
"lists__new_list_input": "新列表...",
"lists__remove": "删除",
"lists__remove_tip": "你真的想要移除 {name} 吗?",
"lists__remove_tip_button": "是的 没错",
"lists__rename": "重命名",
"lists__sort_list": "排序歌曲",
"lists__sync": "更新",
"load_list_file_error_detail": "我们已经帮你把旧的列表文件备份到{path}\n它以 JSON 格式存储,你可以尝试手动修复并恢复它\n\n错误详情{detail}",
"load_list_file_error_title": "播放列表数据加载错误建议到GitHub或加群反馈",
"loding": "加载中...",
"love_list": "收藏",
"lyric__load_error": "歌词获取失败",
"lyric__select": "歌词文本选择",
"min": "最小化",
"music_album": "专辑名",
"music_duplicate": "重复歌曲",
"music_name": "歌曲名",
"music_singer": "艺术家",
"music_sort__btn_cancel": "取消",
"music_sort__btn_confirm": "确定",
"music_sort__input_tip": "请输入要调整到第几个位置",
"music_sort__title": "将 {name} 的位置调整到:",
"music_sort__title_multiple": "将已选的 {num} 首歌曲的位置调整到:",
"music_time": "时长",
"my_list": "我的列表",
"no_item": "列表竟然是空的...",
"not_agree": "不接受",
"pagination__next": "下一页",
"pagination__page": "第 {num} 页",
"pagination__prev": "上一页",
"player__add_music_to": "添加当前歌曲到...",
"player__buffering": "缓冲中...",
"player__desktop_lyric_lock": "右击锁定歌词",
"player__desktop_lyric_off": "关闭桌面歌词",
"player__desktop_lyric_on": "开启桌面歌词",
"player__desktop_lyric_unlock": "右击解锁歌词",
"player__end": "播放完毕",
"player__error": "音频加载出错5 秒后切换下一首",
"player__geting_url": "歌曲链接获取中...",
"player__hide_detail_tip": "隐藏详情页(界面内右键双击可快速隐藏详情页)",
"player__loading": "音乐加载中...",
"player__music_album": "专辑名:",
"player__music_name": "歌曲名:",
"player__music_singer": "艺术家:",
"player__next": "下一首",
"player__pause": "暂停",
"player__pic_tip": "右击在“我的列表”定位当前播放的歌曲",
"player__play": "播放",
"player__play_toggle_mode_list": "顺序播放",
"player__play_toggle_mode_list_loop": "列表循环",
"player__play_toggle_mode_off": "禁用",
"player__play_toggle_mode_random": "列表随机",
"player__play_toggle_mode_single_loop": "单曲循环",
"player__playing": "播放中...",
"player__prev": "上一首",
"player__refresh_url": "URL过期正在刷新URL...",
"player__stop": "暂停播放",
"player__volume": "当前音量:",
"search": "搜索",
"search__hot_search": "热门搜索",
"search__welcome": "搜我所想~~😉",
"setting": "设置",
"setting__about": "关于洛雪音乐",
"setting__backup": "备份与恢复",
"setting__backup_all": "所有数据(列表数据与设置数据)",
"setting__backup_all_export": "导出",
"setting__backup_all_export_desc": "选择备份保存位置",
"setting__backup_all_import": "导入",
"setting__backup_all_import_desc": "选择备份文件",
"setting__backup_other": "其他备份格式(目前不支持恢复此类备份文件)",
"setting__backup_other_export_dir": "选择文件保存位置",
"setting__backup_other_export_list_csv": "导出 CSV 格式的列表",
"setting__backup_other_export_list_text": "导出 TXT 格式的列表",
"setting__backup_other_export_list_text_confirm": "是否将所有列表合并为一个文件?",
"setting__backup_part": "部分数据(列表数据包括试听列表、收藏列表、用户自定义列表,设置数据不包括快捷键设置)",
"setting__backup_part_export_list": "导出列表",
"setting__backup_part_export_list_desc": "选择歌单保存位置",
"setting__backup_part_export_setting": "导出设置",
"setting__backup_part_export_setting_desc": "选择设置保存位置",
"setting__backup_part_import_list": "导入列表",
"setting__backup_part_import_list_desc": "选择列表文件",
"setting__backup_part_import_setting": "导入设置",
"setting__backup_part_import_setting_desc": "选择配置文件",
"setting__basic": "基本设置",
"setting__basic_animation": "弹出层随机动画",
"setting__basic_control_btn_position": "控制按钮位置",
"setting__basic_control_btn_position_left": "左边",
"setting__basic_control_btn_position_right": "右边",
"setting__basic_lang": "语言",
"setting__basic_lang_title": "软件显示的语言",
"setting__basic_show_animation": "显示切换动画",
"setting__basic_source": "音乐来源",
"setting__basic_source_status_failed": "初始化失败",
"setting__basic_source_status_initing": "初始化中",
"setting__basic_source_status_success": "初始化成功",
"setting__basic_source_temp": "临时接口(软件的某些功能不可用,建议测试接口不可用再使用本接口)",
"setting__basic_source_test": "测试接口(几乎软件的所有功能都可用)",
"setting__basic_source_title": "选择音乐来源",
"setting__basic_source_user_api_btn": "自定义源管理",
"setting__basic_sourcename": "音源名字",
"setting__basic_sourcename_alias": "别名",
"setting__basic_sourcename_real": "原名",
"setting__basic_sourcename_title": "选择音源名字类型",
"setting__basic_theme": "主题颜色",
"setting__basic_to_tray": "关闭软件时不退出软件将其最小化到系统托盘",
"setting__basic_window_size": "窗口尺寸",
"setting__basic_window_size_big": "大",
"setting__basic_window_size_huge": "巨大",
"setting__basic_window_size_larger": "较大",
"setting__basic_window_size_medium": "中",
"setting__basic_window_size_oversized": "超大",
"setting__basic_window_size_small": "小",
"setting__basic_window_size_smaller": "较小",
"setting__basic_window_size_title": "设置软件窗口尺寸",
"setting__click_copy": "点击复制",
"setting__click_open": "点击打开",
"setting__desktop_lyric": "桌面歌词设置",
"setting__desktop_lyric_always_on_top": "使歌词总是在其他窗口之上",
"setting__desktop_lyric_enable": "显示歌词",
"setting__desktop_lyric_font": "歌词字体",
"setting__desktop_lyric_font_default": "默认",
"setting__desktop_lyric_lock": "锁定歌词",
"setting__desktop_lyric_lock_screen": "不允许歌词窗口拖出主屏幕之外",
"setting__download": "下载设置",
"setting__download_data_embed": "是否将以下内容嵌入到音频文件中",
"setting__download_embed_lyric": "歌词嵌入",
"setting__download_embed_pic": "封面嵌入",
"setting__download_enable": "是否启用下载功能",
"setting__download_lyric": "歌词下载",
"setting__download_lyric_format": "下载的歌词文件编码格式",
"setting__download_lyric_format_gbk": "GBK在某些设备上出现中文乱码时可尝试选择此格式",
"setting__download_lyric_format_utf8": "UTF-8",
"setting__download_lyric_title": "是否同时下载歌词文件",
"setting__download_name": "文件命名方式",
"setting__download_name1": "歌名 - 歌手",
"setting__download_name2": "歌手 - 歌名",
"setting__download_name3": "歌名",
"setting__download_name_title": "下载歌曲时的命名方式",
"setting__download_path": "下载路径",
"setting__download_path_change_btn": "更改",
"setting__download_path_label": "当前下载路径:",
"setting__download_path_open_label": "点击打开当前路径",
"setting__download_path_title": "下载歌曲保存的路径",
"setting__download_select_save_path": "选择歌曲保存路径",
"setting__download_use_other_source": "自动换源下载",
"setting__download_use_other_source_tip": "当无法从歌曲的原始源下载时尝试切换到其他源下载此功能不100%保证换源后的歌曲版本与原版一致",
"setting__hot_key": "快捷键设置",
"setting__hot_key_common_focus_search_input": "聚焦搜索框",
"setting__hot_key_common_min": "最小化程序",
"setting__hot_key_common_toggle_close": "退出程序",
"setting__hot_key_common_toggle_hide": "显示/隐藏程序",
"setting__hot_key_common_toggle_min": "最小化/还原程序",
"setting__hot_key_desktop_lyric_toggle_always_top": "桌面歌词置顶切换",
"setting__hot_key_desktop_lyric_toggle_lock": "桌面歌词锁定切换",
"setting__hot_key_desktop_lyric_toggle_visible": "开/关桌面歌词",
"setting__hot_key_global_title": "全局快捷键",
"setting__hot_key_local_title": "软件内快捷键",
"setting__hot_key_player_next": "下一首歌曲",
"setting__hot_key_player_prev": "上一首歌曲",
"setting__hot_key_player_toggle_play": "播放/暂停控制",
"setting__hot_key_player_volume_down": "减少音量",
"setting__hot_key_player_volume_mute": "静音切换",
"setting__hot_key_player_volume_up": "增加音量",
"setting__hot_key_tip_input": "请输入新的按键",
"setting__hot_key_unset_input": "未设置",
"setting__is_enable": "是否启用",
"setting__is_show": "是否显示",
"setting__list": "列表设置",
"setting__list_add_music_location_type": "添加歌曲到列表时的位置",
"setting__list_add_music_location_type_bottom": "底部",
"setting__list_add_music_location_type_top": "顶部",
"setting__list_scroll": "记住播放列表滚动条位置(仅对我的音乐分类有效)",
"setting__list_source": "显示歌曲源(仅对我的音乐分类有效)",
"setting__network": "网络设置",
"setting__network_proxy_host": "主机",
"setting__network_proxy_password": "密码",
"setting__network_proxy_port": "端口",
"setting__network_proxy_title": "HTTP代理设置乱设置软件将无法联网",
"setting__network_proxy_username": "用户名",
"setting__odc": "强迫症设置",
"setting__odc_clear_search_input": "离开搜索界面时清空搜索框",
"setting__odc_clear_search_list": "离开搜索界面时清空搜索列表",
"setting__other": "其他",
"setting__other_play_list_cache": "列表缓存管理",
"setting__other_play_list_cache_clear_btn": "清理列表缓存信息",
"setting__other_play_list_cache_tip": "我的列表中已缓存的歌曲链接、播放代替源,清理后播放、下载歌曲时需要重新获取,没有歌曲播放相关的问题不要清理",
"setting__other_play_list_cache_tip_confirm": "我的列表中已缓存的歌曲链接、播放代替源,清理后播放、下载歌曲时需要重新获取,没有歌曲播放相关的问题不要清理,是否确认清理?",
"setting__other_resource_cache": "资源缓存管理",
"setting__other_resource_cache_clear_btn": "清理资源缓存",
"setting__other_resource_cache_confirm": "我要清掉",
"setting__other_resource_cache_label": "软件已使用缓存大小:",
"setting__other_resource_cache_tip": "图片、音频等缓存,清理后图片等资源将需要重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小",
"setting__other_resource_cache_tip_confirm": "涉及图片、音频等缓存,清理后图片等资源将需要重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小,是否仍要清理?",
"setting__other_tray_theme": "托盘图标样式",
"setting__other_tray_theme_black": "黑色",
"setting__other_tray_theme_native": "白色",
"setting__other_tray_theme_origin": "原色",
"setting__play": "播放设置",
"setting__play_lyric_lxlrc": "使用卡拉OK式歌词播放如果支持",
"setting__play_lyric_s2t": "将播放与下载的歌词转换为繁体中文",
"setting__play_lyric_transition": "显示歌词翻译",
"setting__play_mediaDevice": "音频输出",
"setting__play_mediaDevice_remove_stop_play": "当前的声音输出设备被改变时暂停播放歌曲",
"setting__play_mediaDevice_title": "选择声音输出的媒体设备",
"setting__play_quality": "优先播放320K品质的歌曲如果支持",
"setting__play_save_play_time": "记住播放进度",
"setting__play_task_bar": "在任务栏上显示当前歌曲播放进度",
"setting__search": "搜索设置",
"setting__search_focus_search_box": "启动时自动聚焦搜索框",
"setting__search_history": "显示历史搜索记录",
"setting__search_hot": "显示热门搜索",
"setting__sync": "数据同步",
"setting__sync_address": "同步服务地址:{address}",
"setting__sync_auth_code": "连接码:{code}",
"setting__sync_device": "已连接的设备:{devices}",
"setting__sync_enable": "启用同步功能(由于数据是明文传输,请在受信任的网络下使用)",
"setting__sync_port": "同步端口设置",
"setting__sync_port_tip": "请输入同步服务端口号",
"setting__sync_refresh_code": "刷新连接码",
"setting__sync_tip": "使用方式请看常见问题“同步功能”部分",
"setting__update": "软件更新",
"setting__update_checking": "检查更新中...",
"setting__update_current_label": "当前版本:",
"setting__update_downloading": "发现新版本并在努力下载中,请稍后...⏳",
"setting__update_init": "处理更新中...",
"setting__update_latest": "软件已是最新,尽情地体验吧~🥂",
"setting__update_latest_label": "最新版本:",
"setting__update_open_version_modal_btn": "打开更新窗口 🚀",
"setting__update_progress": "下载进度:",
"setting__update_unknown": "未知",
"song_list": "歌单",
"songlist__import_input_tip": "输入歌单链接或歌单ID",
"songlist__import_input_tip_1": "不支持跨源打开歌单,请确认要打开的歌单与当前歌单源是否对应",
"songlist__import_input_tip_2": "若遇到无法打开的歌单链接,欢迎反馈",
"songlist__import_input_tip_3": "酷狗源不支持用歌单ID打开但支持酷狗码打开",
"songlist__open_list": "打开{name}歌单",
"source_alias_all": "聚合大会",
"source_alias_bd": "小杜音乐",
"source_alias_kg": "小枸音乐",
"source_alias_kw": "小蜗音乐",
"source_alias_mg": "小蜜音乐",
"source_alias_tx": "小秋音乐",
"source_alias_wy": "小芸音乐",
"source_alias_xm": "小霞音乐",
"source_all": "聚合搜索",
"source_bd": "百度音乐",
"source_kg": "酷狗音乐",
"source_kw": "酷我音乐",
"source_mg": "咪咕音乐",
"source_tx": "企鹅音乐",
"source_wy": "网易音乐",
"source_xm": "虾米音乐",
"sync__merge_btn_local_remote": "本机列表 合并 远程列表",
"sync__merge_btn_remote_local": "远程列表 合并 本机列表",
"sync__merge_label": "合并",
"sync__merge_tip": "合并:",
"sync__merge_tip_desc": "将两边的列表合并到一起,相同的歌曲将被去掉(去掉的是被合并者的歌曲),不同的歌曲将被添加。",
"sync__other_label": "其他",
"sync__other_tip": "其他:",
"sync__other_tip_desc": "“仅使用实时同步功能”将不修改双方的列表,仅实时同步操作;“取消同步”将直接断开双方的连接。",
"sync__overwrite": "完全覆盖",
"sync__overwrite_btn_cancel": "取消同步",
"sync__overwrite_btn_local_remote": "本机列表 覆盖 远程列表",
"sync__overwrite_btn_none": "仅使用实时同步功能",
"sync__overwrite_btn_remote_local": "远程列表 覆盖 本机列表",
"sync__overwrite_label": "覆盖",
"sync__overwrite_tip": "覆盖:",
"sync__overwrite_tip_desc": "被覆盖者与覆盖者列表ID相同的列表将被删除后替换成覆盖者的列表列表ID不同的列表将被合并到一起若勾选完全覆盖则被覆盖者的所有列表将被移除然后替换成覆盖者的列表。",
"sync__title": "选择与 {name} 的列表同步方式",
"tag__high_quality": "HQ",
"tag__lossless": "SQ",
"theme_black": "黑灯瞎火",
"theme_blue": "蓝田生玉",
"theme_blue2": "清热版蓝",
"theme_green": "绿意盎然",
"theme_grey": "灰常美丽",
"theme_happy_new_year": "新年快乐",
"theme_mid_autumn": "月里嫦娥",
"theme_ming": "青出于黑",
"theme_naruto": "木叶之村",
"theme_orange": "橙黄橘绿",
"theme_pink": "粉装玉琢",
"theme_purple": "重斤球紫",
"theme_red": "热情似火",
"theme_yellow": "信口雌黄",
"user_api__btn_export": "导出",
"user_api__btn_import": "导入",
"user_api__btn_remove": "移除",
"user_api__import_file": "选择音乐API脚本文件",
"user_api__noitem": "这里竟然是空的 😲",
"user_api__note": "提示:虽然我们已经尽可能地隔离了脚本的运行环境,但导入包含恶意行为的脚本仍可能会影响你的系统,请谨慎导入。",
"user_api__readme": "源编写说明:",
"user_api__title": "自定义源管理"
}

407
src/lang/zh-tw.json Normal file
View File

@@ -0,0 +1,407 @@
{
"action": "操作",
"agree": "接受",
"audio_visualization": "音頻可視化(實驗性)",
"back": "返回",
"cancel_button_text": "取消",
"close": "關閉",
"comment__hot_load_error": "熱門評論加載失敗,點擊嘗試重新加載",
"comment__hot_loading": "熱門評論加載中",
"comment__hot_title": "熱門評論",
"comment__new_load_error": "最新評論加載失敗,點擊嘗試重新加載",
"comment__new_loading": "最新評論加載中",
"comment__new_title": "最新評論",
"comment__no_content": "暫無評論",
"comment__refresh": "刷新評論",
"comment__show": "歌曲評論",
"comment__title": "{name} 的評論",
"confirm_button_text": "是的",
"copy_tip": "(點擊複製)",
"date_format_hour": "{num}小時前",
"date_format_minute": "{num}分鐘前",
"date_format_second": "{num}秒前",
"default": "默認",
"default_list": "試聽列表",
"desktop_lyric__back": "返回",
"desktop_lyric__close": "關閉",
"desktop_lyric__font_decrease": "減小字體大小(右擊可微調)",
"desktop_lyric__font_increase": "增加字體大小(右擊可微調)",
"desktop_lyric__lock": "鎖定歌詞",
"desktop_lyric__lrc_active_zoom_off": "取消縮放當前播放的歌詞",
"desktop_lyric__lrc_active_zoom_on": "縮放當前播放的歌詞",
"desktop_lyric__opactiy_decrease": "增加透明度(右擊可微調)",
"desktop_lyric__opactiy_increase": "減小透明度(右擊可微調)",
"desktop_lyric__theme": "主題配色",
"desktop_lyric__unlock": "解鎖歌詞",
"desktop_lyric__win_top_off": "取消置頂歌詞界面",
"desktop_lyric__win_top_on": "置頂歌詞界面",
"download": "下載管理",
"download__all": "全部任務",
"download__error": "出錯",
"download__finished": "下載完成",
"download__high_quality": "高品音質",
"download__lossless": "無損音質",
"download__multiple_tip": "已選擇 {len} 首歌曲",
"download__multiple_tip2": "請選擇要優先下載的音質",
"download__normal": "普通音質",
"download__not_available_tip": "該音質不可用",
"download__paused": "已暫停",
"download__progress": "進度",
"download__quality": "品質",
"download__runing": "正在下載",
"download__status": "狀態",
"export": "導出",
"history_clear": "清空搜索歷史",
"history_remove": "右擊移除該歷史",
"history_search": "歷史搜索",
"import": "導入",
"leaderboard": "排行榜",
"list__add_to": "添加到...",
"list__collect": "收藏",
"list__copy_name": "複製歌曲名",
"list__download": "下載",
"list__export_part_desc": "選擇列表文件保存位置",
"list__file": "定位文件",
"list__import_part_button_cancel": "不要啊",
"list__import_part_button_confirm": "覆蓋掉",
"list__import_part_confirm": "導入的列表({importName})與本地列表({localName}的ID相同是否覆蓋本地列表",
"list__import_part_desc": "選擇列表文件",
"list__load_failed": "啊,加載失敗了😭",
"list__loading": "列表加載中...⏳",
"list__move_to": "移動到...",
"list__movedown": "下移",
"list__moveup": "上移",
"list__new_list_btn": "新建列表",
"list__new_list_input": "新列表...",
"list__pause": "暫停任務",
"list__play": "播放",
"list__play_later": "稍後播放",
"list__remove": "刪除",
"list__remove_tip": "你真的想要移除 {name} 嗎?",
"list__remove_tip_button": "是的 沒錯",
"list__rename": "重命名",
"list__search": "搜索",
"list__sort": "調整位置",
"list__source_detail": "歌曲詳情頁",
"list__start": "開始任務",
"list__sync": "更新",
"list_add__btn_title": "把該歌曲添加到 {name}",
"list_add__multiple_btn_title": "把這些歌曲添加到 {name}",
"list_add__multiple_title_add": "添加已選的 {num} 首歌曲到...",
"list_add__multiple_title_move": "添加移動已選的 {num} 首歌曲到...",
"list_add__title_first_add": "添加",
"list_add__title_first_move": "移動",
"list_add__title_last": "到...",
"list_sort_modal_by_album": "專輯名",
"list_sort_modal_by_down": "降序",
"list_sort_modal_by_field": "排序字段",
"list_sort_modal_by_name": "歌曲名",
"list_sort_modal_by_singer": "歌手名",
"list_sort_modal_by_source": "歌曲源",
"list_sort_modal_by_time": "時長",
"list_sort_modal_by_type": "排序類別",
"list_sort_modal_by_up": "升序",
"list_sort_modal_tip_confirm": "你確定要這麼做嗎?",
"lists__duplicate": "重複歌曲",
"lists__export": "導出",
"lists__export_part_desc": "選擇列表文件保存位置",
"lists__import": "導入",
"lists__import_part_button_cancel": "不要啊",
"lists__import_part_button_confirm": "覆蓋掉",
"lists__import_part_confirm": "導入的列表({importName})與本地列表({localName}的ID相同是否覆蓋本地列表",
"lists__import_part_desc": "選擇列表文件",
"lists__new_list_btn": "新建列表",
"lists__new_list_input": "新列表...",
"lists__remove": "刪除",
"lists__remove_tip": "你真的想要移除 {name} 嗎?",
"lists__remove_tip_button": "是的 沒錯",
"lists__rename": "重命名",
"lists__sort_list": "排序歌曲",
"lists__sync": "更新",
"load_list_file_error_detail": "我們已經幫你把舊的列表文件備份到{path}\n它以 JSON 格式存儲,你可以嘗試手動修復並恢復它\n\n錯誤詳情{detail}",
"load_list_file_error_title": "播放列表數據加載錯誤",
"loding": "加載中...",
"love_list": "收藏列表",
"lyric__load_error": "歌詞獲取失敗",
"lyric__select": "歌詞文本選擇",
"min": "最小化",
"music_album": "專輯名",
"music_duplicate": "重複歌曲",
"music_name": "歌曲名",
"music_singer": "藝術家",
"music_sort__btn_cancel": "取消",
"music_sort__btn_confirm": "確定",
"music_sort__input_tip": "請輸入要調整到第幾個位置",
"music_sort__title": "將 {name} 的位置調整到:",
"music_sort__title_multiple": "將已選的 {num} 首歌曲的位置調整到:",
"music_time": "時長",
"my_list": "我的列表",
"no_item": "列表竟然是空的...",
"not_agree": "不接受",
"pagination__next": "下一頁",
"pagination__page": "第 {num} 頁",
"pagination__prev": "上一頁",
"player__add_music_to": "添加當前歌曲到...",
"player__album": "專輯名:",
"player__buffering": "緩衝中...",
"player__desktop_lyric_lock": "右擊鎖定歌詞",
"player__desktop_lyric_off": "關閉桌面歌詞",
"player__desktop_lyric_on": "開啟桌面歌詞",
"player__desktop_lyric_unlock": "右擊解鎖歌詞",
"player__end": "播放完畢",
"player__error": "音頻加載出錯5 秒後切換下一首",
"player__geting_url": "歌曲鏈接獲取中...",
"player__hide_detail_tip": "隱藏詳情頁(界面內右鍵雙擊可快速隱藏詳情頁)",
"player__loading": "音樂加載中...",
"player__music_name": "歌曲名:",
"player__music_singer": "藝術家:",
"player__next": "下一首",
"player__pause": "暫停",
"player__pic_tip": "右擊在“我的列表”定位當前播放的歌曲",
"player__play": "播放",
"player__play_toggle_mode_list": "順序播放",
"player__play_toggle_mode_list_loop": "列表循環",
"player__play_toggle_mode_off": "禁用",
"player__play_toggle_mode_random": "列表隨機",
"player__play_toggle_mode_single_loop": "單曲循環",
"player__playing": "播放中...",
"player__prev": "上一首",
"player__refresh_url": "URL過期正在刷新URL...",
"player__stop": "暫停播放",
"player__volume": "當前音量:",
"search": "搜索",
"search__hot_search": "熱門搜索",
"search__welcome": "搜我所想~~😉",
"setting": "設置",
"setting__about": "關於洛雪音樂",
"setting__backup": "備份與恢復",
"setting__backup_all": "所有數據(列表數據與設置數據)",
"setting__backup_all_export": "導出",
"setting__backup_all_export_desc": "選擇備份保存位置",
"setting__backup_all_import": "導入",
"setting__backup_all_import_desc": "選擇備份文件",
"setting__backup_other": "其他備份格式(目前不支持恢復此類備份文件)",
"setting__backup_other_export_dir": "選擇文件保存位置",
"setting__backup_other_export_list_csv": "導出 CSV 格式的列表",
"setting__backup_other_export_list_text": "導出 TXT 格式的列表",
"setting__backup_other_export_list_text_confirm": "是否將所有列表合併為一個文件?",
"setting__backup_part": "部分數據(列表數據包括試聽列表、收藏列表、用戶自定義列表,設置數據不包括快捷鍵設置)",
"setting__backup_part_export_list": "導出列表",
"setting__backup_part_export_list_desc": "選擇歌單保存位置",
"setting__backup_part_export_setting": "導出設置",
"setting__backup_part_export_setting_desc": "選擇設置保存位置",
"setting__backup_part_import_list": "導入列表",
"setting__backup_part_import_list_desc": "選擇列表文件",
"setting__backup_part_import_setting": "導入設置",
"setting__backup_part_import_setting_desc": "選擇配置文件",
"setting__basic": "基本設置",
"setting__basic_animation": "彈出層隨機動畫",
"setting__basic_control_btn_position": "控制按鈕位置",
"setting__basic_control_btn_position_left": "左邊",
"setting__basic_control_btn_position_right": "右邊",
"setting__basic_lang": "語言",
"setting__basic_lang_title": "軟件顯示的語言",
"setting__basic_show_animation": "顯示切換動畫",
"setting__basic_source": "音樂來源",
"setting__basic_source_status_failed": "初始化失敗",
"setting__basic_source_status_initing": "初始化中",
"setting__basic_source_status_success": "初始化成功",
"setting__basic_source_temp": "臨時接口(軟件的某些功能不可用,建議測試接口不可用再使用本接口)",
"setting__basic_source_test": "測試接口(幾乎軟件的所有功能都可用)",
"setting__basic_source_title": "選擇音樂來源",
"setting__basic_source_user_api_btn": "自定義源管理",
"setting__basic_sourcename": "音源名字",
"setting__basic_sourcename_alias": "別名",
"setting__basic_sourcename_real": "原名",
"setting__basic_sourcename_title": "選擇音源名字類型",
"setting__basic_theme": "主題顏色",
"setting__basic_to_tray": "關閉軟件時不退出軟件將其最小化到系統托盤",
"setting__basic_window_size": "窗口尺寸",
"setting__basic_window_size_big": "大",
"setting__basic_window_size_huge": "巨大",
"setting__basic_window_size_larger": "較大",
"setting__basic_window_size_medium": "中",
"setting__basic_window_size_oversized": "超大",
"setting__basic_window_size_small": "小",
"setting__basic_window_size_smaller": "較小",
"setting__basic_window_size_title": "設置軟件窗口尺寸",
"setting__click_copy": "點擊複製",
"setting__click_open": "點擊打開",
"setting__desktop_lyric": "桌面歌詞設置",
"setting__desktop_lyric_always_on_top": "使歌詞總是在其他窗口之上",
"setting__desktop_lyric_enable": "顯示歌詞",
"setting__desktop_lyric_font": "歌詞字體",
"setting__desktop_lyric_font_default": "默認",
"setting__desktop_lyric_lock": "鎖定歌詞",
"setting__desktop_lyric_lock_screen": "不允許歌詞窗口拖出主屏幕之外",
"setting__download": "下載設置",
"setting__download_data_embed": "是否將以下內容嵌入到音頻文件中",
"setting__download_embed_lyric": "歌詞嵌入",
"setting__download_embed_pic": "封面嵌入",
"setting__download_enable": "是否啟用下載功能",
"setting__download_lyric": "歌詞下載",
"setting__download_lyric_format": "下載的歌詞文件編碼格式",
"setting__download_lyric_format_gbk": "GBK在某些設備上出現中文亂碼時可嘗試選擇此格式",
"setting__download_lyric_format_utf8": "UTF-8",
"setting__download_lyric_title": "是否同時下載歌詞文件",
"setting__download_name": "文件命名方式",
"setting__download_name1": "歌名 - 歌手",
"setting__download_name2": "歌手 - 歌名",
"setting__download_name3": "歌名",
"setting__download_name_title": "下載歌曲時的命名方式",
"setting__download_path": "下載路徑",
"setting__download_path_change_btn": "更改",
"setting__download_path_label": "當前下載路徑:",
"setting__download_path_open_label": "點擊打開當前路徑",
"setting__download_path_title": "下載歌曲保存的路徑",
"setting__download_select_save_path": "選擇歌曲保存路徑",
"setting__download_use_other_source": "自動換源下載",
"setting__download_use_other_source_tip": "當無法從歌曲的原始源下載時嘗試切換到其他源下載此功能不100%保證換源後的歌曲版本與原版一致",
"setting__hot_key": "快捷鍵設置",
"setting__hot_key_common_focus_search_input": "聚焦搜索框",
"setting__hot_key_common_min": "最小化程序",
"setting__hot_key_common_toggle_close": "退出程序",
"setting__hot_key_common_toggle_hide": "顯示/隱藏程序",
"setting__hot_key_common_toggle_min": "最小化/還原程序",
"setting__hot_key_desktop_lyric_toggle_always_top": "桌面歌詞置頂切換",
"setting__hot_key_desktop_lyric_toggle_lock": "桌面歌詞鎖定切換",
"setting__hot_key_desktop_lyric_toggle_visible": "開/關桌面歌詞",
"setting__hot_key_global_title": "全局快捷鍵",
"setting__hot_key_local_title": "軟件內快捷鍵",
"setting__hot_key_player_next": "下一首歌曲",
"setting__hot_key_player_prev": "上一首歌曲",
"setting__hot_key_player_toggle_play": "播放/暫停控制​​",
"setting__hot_key_player_volume_down": "減少音量",
"setting__hot_key_player_volume_mute": "靜音切換",
"setting__hot_key_player_volume_up": "增加音量",
"setting__hot_key_tip_input": "請輸入新的按鍵",
"setting__hot_key_unset_input": "未設置",
"setting__is_enable": "是否啟用",
"setting__is_show": "是否顯示",
"setting__list": "列表設置",
"setting__list_add_music_location_type": "添加歌曲到列表時的位置",
"setting__list_add_music_location_type_bottom": "底部",
"setting__list_add_music_location_type_top": "頂部",
"setting__list_scroll": "記住播放列表滾動條位置(僅對我的音樂分類有效)",
"setting__list_source": "顯示歌曲源(僅對我的音樂分類有效)",
"setting__network": "網絡設置",
"setting__network_proxy_host": "主機",
"setting__network_proxy_password": "密碼",
"setting__network_proxy_port": "端口",
"setting__network_proxy_title": "HTTP代理設置亂設置軟件將無法聯網",
"setting__network_proxy_username": "用戶名",
"setting__odc": "強迫症設置",
"setting__odc_clear_search_input": "離開搜索界面時清空搜索框",
"setting__odc_clear_search_list": "離開搜索界面時清空搜索列表",
"setting__other": "其他",
"setting__other_play_list_cache": "列表緩存管理",
"setting__other_play_list_cache_clear_btn": "清理列表緩存信息",
"setting__other_play_list_cache_tip": "我的列表中已緩存的歌曲鏈接、播放代替源,清理後播放、下載歌曲時需要重新獲取,沒有歌曲播放相關的問題不要清理",
"setting__other_play_list_cache_tip_confirm": "我的列表中已緩存的歌曲鏈接、播放代替源,清理後播放、下載歌曲時需要重新獲取,沒有歌曲播放相關的問題不要清理,是否確認清理?",
"setting__other_resource_cache": "資源緩存管理",
"setting__other_resource_cache_clear_btn": "清理資源緩存",
"setting__other_resource_cache_confirm": "我要清掉",
"setting__other_resource_cache_label": "軟件已使用緩存大小:",
"setting__other_resource_cache_tip": "圖片、音頻等緩存,清理後圖片等資源將需要重新下載,不建議清理,軟件會根據磁盤空間動態管理緩存大小",
"setting__other_resource_cache_tip_confirm": "涉及圖片、音頻等緩存,清理後圖片等資源將需要重新下載,不建議清理,軟件會根據磁盤空間動態管理緩存大小,是否仍要清理?",
"setting__other_tray_theme": "托盤圖標樣式",
"setting__other_tray_theme_black": "黑色",
"setting__other_tray_theme_native": "白色",
"setting__other_tray_theme_origin": "原色",
"setting__play": "播放設置",
"setting__play_lyric_lxlrc": "使用卡拉OK式歌詞播放如果支持",
"setting__play_lyric_s2t": "將播放與下載的歌詞轉換為繁體中文",
"setting__play_lyric_transition": "顯示歌詞翻譯",
"setting__play_mediaDevice": "音頻輸出",
"setting__play_mediaDevice_remove_stop_play": "當前的聲音輸出設備被改變時暫停播放歌曲",
"setting__play_mediaDevice_title": "選擇聲音輸出的媒體設備",
"setting__play_quality": "優先播放320K品質的歌曲如果支持",
"setting__play_save_play_time": "記住播放進度",
"setting__play_task_bar": "在任務欄上顯示當前歌曲播放進度",
"setting__search": "搜索設置",
"setting__search_focus_search_box": "啟動時自動聚焦搜索框",
"setting__search_history": "顯示歷史搜索記錄",
"setting__search_hot": "顯示熱門搜索",
"setting__sync": "數據同步",
"setting__sync_address": "同步服務地址:{address}",
"setting__sync_auth_code": "連接碼:{code}",
"setting__sync_device": "已連接的設備:{devices}",
"setting__sync_enable": "啟用同步功能(由於數據是明文傳輸,請在受信任的網絡下使用)",
"setting__sync_port": "同步端口設置",
"setting__sync_port_tip": "請輸入同步服務端口號",
"setting__sync_refresh_code": "刷新連接碼",
"setting__sync_tip": "使用方式請看常見問題“同步功能”部分",
"setting__update": "軟件更新",
"setting__update_checking": "檢查更新中...",
"setting__update_current_label": "當前版本:",
"setting__update_downloading": "發現新版本並在努力下載中,請稍後...⏳",
"setting__update_init": "處理更新中...",
"setting__update_latest": "軟件已是最新,盡情地體驗吧~🥂",
"setting__update_latest_label": "最新版本:",
"setting__update_open_version_modal_btn": "打開更新窗口 🚀",
"setting__update_progress": "下載進度:",
"setting__update_unknown": "未知",
"song_list": "歌單",
"songlist__import_input_tip": "輸入歌單鏈接或歌單ID",
"songlist__import_input_tip_1": "不支持跨源打開歌單,請確認要打開的歌單與當前歌單源是否對應",
"songlist__import_input_tip_2": "若遇到無法打開的歌單鏈接,歡迎反饋",
"songlist__import_input_tip_3": "酷狗源不支持用歌單ID打開但支持酷狗碼打開",
"songlist__open_list": "打開{name}歌單",
"source_alias_all": "聚合大會",
"source_alias_bd": "小杜音樂",
"source_alias_kg": "小枸音樂",
"source_alias_kw": "小蝸音樂",
"source_alias_mg": "小蜜音樂",
"source_alias_tx": "小秋音樂",
"source_alias_wy": "小芸音樂",
"source_alias_xm": "小霞音樂",
"source_all": "聚合搜索",
"source_bd": "百度音樂",
"source_kg": "酷狗音樂",
"source_kw": "酷我音樂",
"source_mg": "咪咕音樂",
"source_tx": "企鵝音樂",
"source_wy": "網易音樂",
"source_xm": "蝦米音樂",
"sync__merge_btn_local_remote": "本機列表 合併 遠程列表",
"sync__merge_btn_remote_local": "遠程列表 合併 本機列表",
"sync__merge_label": "合併",
"sync__merge_tip": "合併:",
"sync__merge_tip_desc": "將兩邊的列表合併到一起,相同的歌曲將被去掉(去掉的是被合併者的歌曲),不同的歌曲將被添加。",
"sync__other_label": "其他",
"sync__other_tip": "其他:",
"sync__other_tip_desc": "“僅使用實時同步功能”將不修改雙方的列表,僅實時同步操作;“取消同步”將直接斷開雙方的連接。",
"sync__overwrite": "完全覆蓋",
"sync__overwrite_btn_cancel": "取消同步",
"sync__overwrite_btn_local_remote": "本機列表 覆蓋 遠程列表",
"sync__overwrite_btn_none": "僅使用實時同步功能",
"sync__overwrite_btn_remote_local": "遠程列表 覆蓋 本機列表",
"sync__overwrite_label": "覆蓋",
"sync__overwrite_tip": "覆蓋:",
"sync__overwrite_tip_desc": "被覆蓋者與覆蓋者列表ID相同的列表將被刪除後替換成覆蓋者的列表列表ID不同的列表將被合併到一起若勾選完全覆蓋則被覆蓋者的所有列表將被移除然後替換成覆蓋者的列表。",
"sync__title": "選擇與 {name} 的列表同步方式",
"tag__high_quality": "HQ",
"tag__lossless": "SQ",
"theme_black": "黑燈瞎火",
"theme_blue": "藍田生玉",
"theme_blue2": "清熱版藍",
"theme_green": "綠意盎然",
"theme_grey": "灰常美麗",
"theme_happy_new_year": "新年快樂",
"theme_mid_autumn": "月裡嫦娥",
"theme_ming": "青出於黑",
"theme_naruto": "木葉之村",
"theme_orange": "橙黃橘綠",
"theme_pink": "粉裝玉琢",
"theme_purple": "重斤球紫",
"theme_red": "熱情似火",
"theme_yellow": "信口雌黃",
"user_api__btn_export": "導出",
"user_api__btn_import": "導入",
"user_api__btn_remove": "移除",
"user_api__import_file": "選擇音樂API腳本文件",
"user_api__noitem": "這裡竟然是空的 😲",
"user_api__note": "提示:雖然我們已經盡可能地隔離了腳本的運行環境,但導入包含惡意行為的腳本仍可能會影響你的系統,請謹慎導入。",
"user_api__readme": "源編寫說明:",
"user_api__title": "自定義源管理"
}

View File

@@ -2,7 +2,7 @@ const { common: COMMON_EVENT_NAME, mainWindow: MAIN_WINDOW_EVENT_NAME } = requir
const { mainSend, NAMES: { mainWindow: ipcMainWindowNames } } = require('./../common/ipc')
const { getAppHotKeyConfig } = require('./utils')
global.lx_event.common.on(COMMON_EVENT_NAME.config, name => {
global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, name => {
if (MAIN_WINDOW_EVENT_NAME.name === name) return
if (global.modules.mainWindow) mainSend(global.modules.mainWindow, ipcMainWindowNames.set_config, global.appSetting)
})

View File

@@ -1,16 +1,18 @@
const { EventEmitter } = require('events')
const { common: COMMON_EVENT_NAME } = require('./_name')
const { updateSetting } = require('../utils')
class Common extends EventEmitter {
initSetting() {
this.emit(COMMON_EVENT_NAME.initConfig)
this.emit(COMMON_EVENT_NAME.config, null)
this.configStatus(null)
}
setAppConfig(config, name) {
if (config) updateSetting(config)
this.emit(COMMON_EVENT_NAME.config, name)
configStatus(name) {
this.emit(COMMON_EVENT_NAME.configStatus, name)
}
saveMyList(data) {
this.emit(COMMON_EVENT_NAME.saveMyList, data)
}
}

View File

@@ -1,6 +1,7 @@
exports.common = {
initConfig: 'initConfig',
config: 'config',
configStatus: 'config',
saveMyList: 'saveMyList',
}
exports.mainWindow = {

View File

@@ -6,8 +6,14 @@ const Tray = require('./Tray')
const WinLyric = require('./WinLyric')
const HotKey = require('./HotKey')
const { Event: UserApi } = require('../modules/userApi')
const { Event: Sync } = require('../modules/sync')
if (!global.lx_event.common) global.lx_event.common = new Common()
if (!global.lx_event.mainWindow) global.lx_event.mainWindow = new MainWindow()
if (!global.lx_event.tray) global.lx_event.tray = new Tray()
if (!global.lx_event.winLyric) global.lx_event.winLyric = new WinLyric()
if (!global.lx_event.hotKey) global.lx_event.hotKey = new HotKey()
if (!global.lx_event.userApi) global.lx_event.userApi = new UserApi()
if (!global.lx_event.sync) global.lx_event.sync = new Sync()

View File

@@ -6,7 +6,7 @@
*/
const electron = require('electron')
const electronDebug = require('electron-debug')
const { default: installExtension, VUEJS_DEVTOOLS } = require('electron-devtools-installer')
const { default: installExtension, VUEJS3_DEVTOOLS } = require('electron-devtools-installer')
// Install `electron-debug` with `devtron`
electronDebug({
showDevTools: true,
@@ -15,7 +15,7 @@ electronDebug({
// Install `vue-devtools`
electron.app.on('ready', () => {
installExtension(VUEJS_DEVTOOLS)
installExtension(VUEJS3_DEVTOOLS)
.then(name => console.log(`Added Extension: ${name}`))
.catch(err => console.log('An error occurred: ', err))
})

View File

@@ -4,7 +4,7 @@ const path = require('path')
// 单例应用程序
if (!app.requestSingleInstanceLock()) {
app.quit()
return
process.exit(0)
}
if (!global.modules) global.modules = {}
app.on('second-instance', (event, argv, cwd) => {
@@ -28,20 +28,25 @@ require('./env')
// Is disable hardware acceleration
if (global.envParams.cmdParams.dha) app.disableHardwareAcceleration()
if (global.envParams.cmdParams.dt == null && global.envParams.cmdParams.nt != null) global.envParams.cmdParams.dt = global.envParams.cmdParams.nt
if (global.envParams.cmdParams.dhmkh) app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling')
// fix linux transparent fail. https://github.com/electron/electron/issues/25153#issuecomment-843688494
if (process.platform == 'linux') app.commandLine.appendSwitch('use-gl', 'desktop')
// https://github.com/electron/electron/issues/22691
app.commandLine.appendSwitch('wm-window-animations-disabled')
const { navigationUrlWhiteList } = require('../common/config')
const { getWindowSizeInfo } = require('./utils')
const { isMac, isLinux, initSetting, initHotKey } = require('../common/utils')
const { navigationUrlWhiteList, themes } = require('../common/config')
const { getWindowSizeInfo, initSetting, updateSetting } = require('./utils')
const { isMac, isLinux, initHotKey } = require('../common/utils')
// https://github.com/electron/electron/issues/18397
// 开发模式下为true时 多次引入native模块会导致渲染进程卡死
// https://github.com/electron/electron/issues/22791
app.allowRendererProcessReuse = !isDev
// app.allowRendererProcessReuse = !isDev
app.on('web-contents-created', (event, contents) => {
@@ -50,12 +55,12 @@ app.on('web-contents-created', (event, contents) => {
if (!navigationUrlWhiteList.some(url => url.test(navigationUrl))) return event.preventDefault()
console.log('navigation to url:', navigationUrl)
})
contents.on('new-window', async(event, navigationUrl) => {
event.preventDefault()
if (/^devtools/.test(navigationUrl)) return
console.log(navigationUrl)
if (!/^https?:\/\//.test(navigationUrl)) return
await shell.openExternal(navigationUrl)
contents.setWindowOpenHandler(({ url }) => {
if (!/^devtools/.test(url) && /^https?:\/\//.test(url)) {
shell.openExternal(url)
}
console.log(url)
return { action: 'deny' }
})
contents.on('will-attach-webview', (event, webPreferences, params) => {
// Strip away preload scripts if unused or verify their location is legitimate
@@ -110,13 +115,14 @@ function createWindow() {
fullscreenable: false,
show: false,
webPreferences: {
// contextIsolation: true,
contextIsolation: false,
webSecurity: !isDev,
nodeIntegration: true,
spellcheck: false, // 禁用拼写检查器
},
})
global.modules.mainWindow.loadURL(winURL)
global.modules.mainWindow.loadURL(winURL + `?dt=${!!global.envParams.cmdParams.dt}&theme=${themes.find(t => t.id == global.appSetting.themeId)?.className ?? themes[0].className}`)
winEvent(global.modules.mainWindow)
// global.modules.mainWindow.webContents.openDevTools()
@@ -130,11 +136,16 @@ global.appHotKey = {
state: null,
}
global.lx_core = {
setAppConfig(setting, name) {
updateSetting(setting)
global.lx_event.common.configStatus(name)
},
}
function init() {
console.log('init')
const info = initSetting()
global.appSetting = info.setting
global.appSettingVersion = info.version
initSetting()
global.appHotKey.config = initHotKey()
global.lx_event.common.initSetting()
global.lx_event.hotKey.init()

View File

@@ -2,3 +2,4 @@ require('./appMenu')
require('./winLyric')
require('./tray')
require('./hotKey')
require('./userApi')

View File

@@ -0,0 +1,23 @@
const { EventEmitter } = require('events')
const SYNC_EVENT_NAME = require('./name')
class Sync extends EventEmitter {
status(status) {
this.emit(SYNC_EVENT_NAME.status, status)
}
sync_list(data) {
this.emit(SYNC_EVENT_NAME.sync_list, data)
}
sync_handle_list(data) {
this.emit(SYNC_EVENT_NAME.sync_handle_list, data)
}
action_list(data) {
this.emit(SYNC_EVENT_NAME.sync_action_list, data)
}
}
module.exports = Sync

View File

@@ -0,0 +1,6 @@
module.exports = {
sync_action_list: 'sync_action_list',
sync_list: 'sync_list',
sync_handle_list: 'sync_handle_list',
status: 'status',
}

View File

@@ -0,0 +1,15 @@
const Event = require('./event/event')
const eventNames = require('./event/name')
const modules = require('./modules')
const { startServer, stopServer, getStatus, generateCode } = require('./server/server')
module.exports = {
startServer,
stopServer,
getStatus,
generateCode,
Event,
eventNames,
modules,
}

View File

@@ -0,0 +1 @@
exports.list = require('./list')

View File

@@ -0,0 +1,41 @@
const { encryptMsg, decryptMsg } = require('../server/utils')
let io
const handleListAction = ({ action, data }) => {
// console.log(action, data)
global.lx_event.sync.action_list({ action, data })
}
// const addMusic = (orderId, callback) => {
// // ...
// }
const broadcast = async(action, data, excludeIds = []) => {
if (!io) return
const sockets = await io.fetchSockets()
for (const socket of sockets) {
if (excludeIds.includes(socket.data.keyInfo.clientId)) continue
socket.emit(action, encryptMsg(socket.data.keyInfo, data))
}
}
exports.sendListAction = (action, data) => {
// io.sockets
return broadcast('list:action', JSON.stringify({ action, data }))
}
exports.registerListHandler = (_io, socket) => {
io = _io
socket.on('list:action', msg => {
// console.log(msg)
msg = decryptMsg(socket.data.keyInfo, msg)
if (!msg) return
handleListAction(JSON.parse(msg))
broadcast('list:action', msg, [socket.data.keyInfo.clientId])
// socket.broadcast.emit('list:action', { action: 'list_remove', data: { id: 'default', index: 0 } })
})
// socket.on('list:add', addMusic)
}
exports.unregisterListHandler = () => {
io = null
}

View File

@@ -0,0 +1,69 @@
const { aesEncrypt, aesDecrypt, createClientKeyInfo, getClientKeyInfo, setClientKeyInfo } = require('./utils')
const authMsg = 'lx-music auth::'
const helloMsg = 'Hello~::^-^::'
exports.authCode = async(req, res, authCode) => {
let code = 401
let msg = 'Forbidden'
// console.log(req.headers)
if (req.headers.m) {
label:
if (req.headers.i) {
const keyInfo = getClientKeyInfo(req.headers.i)
if (!keyInfo) break label
let text
try {
text = aesDecrypt(req.headers.m, keyInfo.key, keyInfo.iv)
} catch (err) {
break label
}
console.log(text)
if (text.startsWith(authMsg)) {
code = 200
const deviceName = text.replace(authMsg, '') || 'Unknown'
if (deviceName != keyInfo.deviceName) {
keyInfo.deviceName = deviceName
setClientKeyInfo(keyInfo)
}
msg = aesEncrypt(helloMsg, keyInfo.key, keyInfo.iv)
}
} else {
let key = ''.padStart(16, Buffer.from(authCode).toString('hex'))
const iv = Buffer.from(key.split('').reverse().join('')).toString('base64')
key = Buffer.from(key).toString('base64')
// console.log(authCode, key, iv)
let text
try {
text = aesDecrypt(req.headers.m, key, iv)
} catch (err) {
break label
}
console.log(text)
if (text.startsWith(authMsg)) {
code = 200
const deviceName = text.replace(authMsg, '') || 'Unknown'
msg = aesEncrypt(JSON.stringify(createClientKeyInfo(deviceName)), key, iv)
}
}
}
res.writeHead(code)
res.end(msg)
}
exports.authConnect = async req => {
const { i, t } = req._query
label:
if (i && t) {
const keyInfo = getClientKeyInfo(i)
if (!keyInfo) break label
let text
try {
text = aesDecrypt(t, keyInfo.key, keyInfo.iv)
} catch (err) {
break label
}
if (text == 'lx-music connect') return
}
throw new Error('failed')
}

View File

@@ -0,0 +1,7 @@
const { startServer, stopServer, getStatus } = require('./server')
module.exports = {
startServer,
stopServer,
getStatus,
}

View File

@@ -0,0 +1,174 @@
const http = require('http')
const sio = require('socket.io')
const { createHttpTerminator } = require('http-terminator')
const modules = require('../modules')
const { authCode, authConnect } = require('./auth')
const { getAddress, getServerId, generateCode, getClientKeyInfo } = require('./utils')
const syncList = require('./syncList')
const { log } = require('@common/utils')
let status = {
status: false,
message: '',
address: [],
code: '',
devices: [],
}
const handleConnection = (io, socket) => {
console.log('connection')
// console.log(socket.handshake.query)
for (const module of Object.values(modules)) {
module.registerListHandler(io, socket)
}
}
const authConnection = (req, callback) => {
// console.log(req.headers)
// // console.log(req.auth)
// console.log(req._query.authCode)
authConnect(req).then(() => {
callback(null, true)
}).catch(err => {
callback(err, false)
})
}
let httpTerminator = null
let io = null
const handleStartServer = (port = 9527) => new Promise((resolve, reject) => {
const httpServer = http.createServer((req, res) => {
// console.log(req.url)
let code
let msg
switch (req.url) {
case '/hello':
code = 200
msg = 'Hello~::^-^::'
break
case '/id':
code = 200
msg = 'OjppZDo6' + getServerId()
break
case '/ah':
authCode(req, res, status.code)
break
default:
code = 401
msg = 'Forbidden'
break
}
if (!code) return
res.writeHead(code)
res.end(msg)
})
httpTerminator = createHttpTerminator({
server: httpServer,
})
io = sio(httpServer, {
path: '/sync',
serveClient: false,
connectTimeout: 10000,
pingTimeout: 30000,
maxHttpBufferSize: 1e9, // 1G
allowRequest: authConnection,
transports: ['websocket'],
})
io.on('connection', async socket => {
socket.on('disconnect', reason => {
console.log('disconnect', reason)
status.devices.splice(status.devices.findIndex(k => k.clientId == keyInfo.clientId), 1)
global.lx_event.sync.status(status)
})
const keyInfo = getClientKeyInfo(socket.handshake.query.i)
// socket.lx_keyInfo = keyInfo
socket.data.keyInfo = keyInfo
try {
await syncList(io, socket)
} catch (err) {
// console.log(err)
log.warn(err)
return
}
status.devices.push(keyInfo)
handleConnection(io, socket, keyInfo)
global.lx_event.sync.status(status)
})
httpServer.on('error', error => {
console.log(error)
reject(error)
})
httpServer.on('listening', () => {
const addr = httpServer.address()
const bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port
console.info(`Listening on ${bind}`)
resolve()
})
httpServer.listen(port)
})
const handleStopServer = async() => {
if (!httpTerminator) return
await io.close()
await httpTerminator.terminate().catch(() => {})
io = null
httpTerminator = null
}
exports.stopServer = async() => {
if (!status.status) {
status.status = false
status.message = ''
status.address = []
status.code = ''
global.lx_event.sync.status(status)
return
}
console.log('stoping sync server...')
return handleStopServer().then(() => {
console.log('sync server stoped')
status.status = false
status.message = ''
status.address = []
status.code = ''
}).catch(err => {
console.log(err)
status.message = err.message
}).finally(() => {
global.lx_event.sync.status(status)
})
}
exports.startServer = async port => {
if (status.status) await handleStopServer()
console.log('starting sync server...')
return handleStartServer(port).then(() => {
console.log('sync server started')
status.status = true
status.message = ''
status.address = getAddress()
status.code = generateCode()
}).catch(err => {
console.log(err)
status.status = false
status.message = err.message
status.address = []
status.code = ''
}).finally(() => {
global.lx_event.sync.status(status)
})
}
exports.getStatus = () => status
exports.generateCode = async() => {
status.code = generateCode()
global.lx_event.sync.status(status)
return status.code
}

View File

@@ -0,0 +1,436 @@
const path = require('path')
const fs = require('fs')
const fsPromises = fs.promises
const { app } = require('electron')
const { encryptMsg, decryptMsg } = require('./utils')
const SYNC_EVENT_NAMES = require('../event/name')
const { common: COMMON_EVENT_NAME } = require('@main/events/_name')
const { throttle } = require('@common/utils')
let io
let syncingId = null
const wait = (time = 1000) => new Promise((resolve, reject) => setTimeout(resolve, time))
const patchListData = listData => {
return Object.assign({}, {
defaultList: {
id: 'default',
name: '试听列表',
list: [],
},
loveList: {
id: 'love',
name: '我的收藏',
list: [],
},
userList: [],
}, listData)
}
const getRemoteListData = socket => new Promise((resolve, reject) => {
console.log('getRemoteListData')
const handleError = reason => {
reject(new Error(reason))
}
const handleSuccess = enData => {
socket.removeListener('disconnect', handleError)
socket.removeListener('list:sync', handleSuccess)
console.log('getRemoteListData', 'handleSuccess')
const data = JSON.parse(decryptMsg(socket.data.keyInfo, enData))
if (!data) return reject(new Error('Get remote list data failed'))
if (data.action != 'getData') return
resolve(patchListData(data.data))
}
socket.on('disconnect', handleError)
socket.on('list:sync', handleSuccess)
socket.emit('list:sync', encryptMsg(socket.data.keyInfo, JSON.stringify({ action: 'getData', data: 'all' })))
})
const getLocalListData = () => new Promise((resolve, reject) => {
const handleSuccess = ({ action, data }) => {
if (action !== 'getData') return
global.lx_event.sync.off(SYNC_EVENT_NAMES.sync_handle_list, handleSuccess)
resolve(patchListData(data))
}
global.lx_event.sync.on(SYNC_EVENT_NAMES.sync_handle_list, handleSuccess)
global.lx_event.sync.sync_list({
action: 'getData',
})
})
const getSyncMode = keyInfo => new Promise((resolve, reject) => {
const handleSuccess = ({ action, data }) => {
if (action !== 'selectMode') return
global.lx_event.sync.off(SYNC_EVENT_NAMES.sync_handle_list, handleSuccess)
resolve(data)
}
global.lx_event.sync.on(SYNC_EVENT_NAMES.sync_handle_list, handleSuccess)
global.lx_event.sync.sync_list({
action: 'selectMode',
data: keyInfo,
})
})
const finishedSync = socket => {
return socket.emit('list:sync', encryptMsg(socket.data.keyInfo, JSON.stringify({
action: 'finished',
})))
}
const setLocalList = listData => {
global.lx_event.sync.sync_list({
action: 'setData',
data: listData,
})
}
const setRemotelList = async(socket, listData) => {
if (!io) return
const sockets = await io.fetchSockets()
for (const socket of sockets) {
// if (excludeIds.includes(socket.data.keyInfo.clientId)) continue
socket.emit('list:sync', encryptMsg(socket.data.keyInfo, JSON.stringify({ action: 'setData', data: listData })))
}
}
let writeFilePromises = {}
const updateSnapshot = (path, data) => {
console.log('updateSnapshot', path)
let writeFilePromise = writeFilePromises[path] || Promise.resolve()
return writeFilePromise.then(() => {
writeFilePromise = writeFilePromises[path] = fsPromises.writeFile(path, data)
return writeFilePromise
})
}
const createUserListDataObj = listData => {
const userListDataObj = {}
for (const list of listData.userList) userListDataObj[list.id] = list
return userListDataObj
}
const handleMergeList = (sourceList, targetList, addMusicLocationType) => {
let newList
switch (addMusicLocationType) {
case 'top':
newList = [...targetList.list, ...sourceList.list]
break
case 'bottom':
default:
newList = [...sourceList.list, ...targetList.list]
break
}
const map = {}
const ids = []
switch (addMusicLocationType) {
case 'top':
newList = [...targetList.list, ...sourceList.list]
for (let i = newList.length - 1; i > -1; i--) {
const item = newList[i]
if (map[item.songmid]) continue
ids.unshift(item.songmid)
map[item.songmid] = item
}
break
case 'bottom':
default:
newList = [...sourceList.list, ...targetList.list]
for (const item of newList) {
if (map[item.songmid]) continue
ids.push(item.songmid)
map[item.songmid] = item
}
break
}
return {
...sourceList,
list: ids.map(id => map[id]),
}
}
const mergeList = (sourceListData, targetListData) => {
const addMusicLocationType = global.appSetting.list.addMusicLocationType
const newListData = {}
newListData.defaultList = handleMergeList(sourceListData.defaultList, targetListData.defaultList, addMusicLocationType)
newListData.loveList = handleMergeList(sourceListData.loveList, targetListData.loveList, addMusicLocationType)
const userListDataObj = createUserListDataObj(sourceListData)
newListData.userList = [...sourceListData.userList]
targetListData.userList.forEach((list, index) => {
const targetUpdateTime = list?.locationUpdateTime ?? 0
const sourceList = userListDataObj[list.id]
if (sourceList) {
sourceList.list = handleMergeList(sourceList, list, addMusicLocationType).list
const sourceUpdateTime = sourceList?.locationUpdateTime ?? 0
if (targetUpdateTime >= sourceUpdateTime) return
// 调整位置
const [newList] = newListData.userList.splice(newListData.userList.findIndex(l => l.id == list.id), 1)
newList.locationUpdateTime = targetUpdateTime
newListData.userList.splice(index, 0, newList)
} else {
if (targetUpdateTime) {
newListData.userList.splice(index, 0, list)
} else {
newListData.userList.push(list)
}
}
})
return newListData
}
const overwriteList = (sourceListData, targetListData) => {
const newListData = {}
newListData.defaultList = sourceListData.defaultList
newListData.loveList = sourceListData.loveList
const userListDataObj = createUserListDataObj(sourceListData)
newListData.userList = [...sourceListData.userList]
targetListData.userList.forEach((list, index) => {
if (userListDataObj[list.id]) return
if (list?.locationUpdateTime) {
newListData.userList.splice(index, 0, list)
} else {
newListData.userList.push(list)
}
})
return newListData
}
const handleMergeListData = async socket => {
let isSelectingMode = false
const handleDisconnect = () => {
if (!isSelectingMode) return
global.lx_event.sync.sync_list({
action: 'closeSelectMode',
})
}
socket.on('disconnect', handleDisconnect)
isSelectingMode = true
const mode = await getSyncMode(socket.data.keyInfo)
isSelectingMode = false
const [remoteListData, localListData] = await Promise.all([getRemoteListData(socket), getLocalListData()])
console.log('handleMergeListData', 'remoteListData, localListData')
let listData
switch (mode) {
case 'merge_local_remote':
listData = mergeList(localListData, remoteListData)
break
case 'merge_remote_local':
listData = mergeList(remoteListData, localListData)
break
case 'overwrite_local_remote':
listData = overwriteList(localListData, remoteListData)
break
case 'overwrite_remote_local':
listData = overwriteList(remoteListData, localListData)
break
case 'overwrite_local_remote_full':
listData = localListData
break
case 'overwrite_remote_local_full':
listData = remoteListData
break
case 'none': return
case 'cancel':
socket.disconnect(true)
throw new Error('cancel')
}
return listData
}
const handleSyncList = async socket => {
const [remoteListData, localListData] = await Promise.all([getRemoteListData(socket), getLocalListData()])
console.log('handleSyncList', 'remoteListData, localListData')
const listData = {}
if (localListData.defaultList.list.length || localListData.loveList.list.length || localListData.userList.length) {
if (remoteListData.defaultList.list.length || remoteListData.loveList.list.length || remoteListData.userList.length) {
const mergedList = await handleMergeListData(socket)
console.log('handleMergeListData', 'mergedList')
console.log(mergedList)
if (!mergedList) return
listData.defaultList = mergedList.defaultList
listData.loveList = mergedList.loveList
listData.userList = mergedList.userList
setLocalList(mergedList)
setRemotelList(socket, mergedList)
} else {
setRemotelList(socket, localListData)
listData.defaultList = localListData.defaultList
listData.loveList = localListData.loveList
listData.userList = localListData.userList
}
} else {
if (remoteListData.defaultList.list.length || remoteListData.loveList.list.length || remoteListData.userList.length) {
setLocalList(remoteListData)
listData.defaultList = remoteListData.defaultList
listData.loveList = remoteListData.loveList
listData.userList = remoteListData.userList
} else {
listData.defaultList = localListData.defaultList
listData.loveList = localListData.loveList
listData.userList = localListData.userList
}
}
return updateSnapshot(socket.data.snapshotFilePath, JSON.stringify({
defaultList: listData.defaultList,
loveList: listData.loveList,
userList: listData.userList,
})).then(() => {
socket.data.isCreatedSnapshot = true
return listData
})
}
const mergeListDataFromSnapshot = (sourceList, targetList, snapshotList, addMusicLocationType) => {
const removedListIds = new Set()
const sourceListItemIds = new Set()
const targetListItemIds = new Set()
for (const m of sourceList.list) sourceListItemIds.add(m.songmid)
for (const m of targetList.list) targetListItemIds.add(m.songmid)
if (snapshotList) {
for (const m of snapshotList.list) {
if (!sourceListItemIds.has(m.songmid) || !targetListItemIds.has(m.songmid)) removedListIds.add(m.songmid)
}
}
let newList
const map = {}
const ids = []
switch (addMusicLocationType) {
case 'top':
newList = [...targetList.list, ...sourceList.list]
for (let i = newList.length - 1; i > -1; i--) {
const item = newList[i]
if (map[item.songmid] || removedListIds.has(item.songmid)) continue
ids.unshift(item.songmid)
map[item.songmid] = item
}
break
case 'bottom':
default:
newList = [...sourceList.list, ...targetList.list]
for (const item of newList) {
if (map[item.songmid] || removedListIds.has(item.songmid)) continue
ids.push(item.songmid)
map[item.songmid] = item
}
break
}
return {
...sourceList,
list: ids.map(id => map[id]),
}
}
const handleMergeListDataFromSnapshot = async(socket, snapshot) => {
const addMusicLocationType = global.appSetting.list.addMusicLocationType
const [remoteListData, localListData] = await Promise.all([getRemoteListData(socket), getLocalListData()])
const newListData = {}
newListData.defaultList = mergeListDataFromSnapshot(localListData.defaultList, remoteListData.defaultList, snapshot.defaultList, addMusicLocationType)
newListData.loveList = mergeListDataFromSnapshot(localListData.loveList, remoteListData.loveList, snapshot.loveList, addMusicLocationType)
const localUserListData = createUserListDataObj(localListData)
const remoteUserListData = createUserListDataObj(remoteListData)
const snapshotUserListData = createUserListDataObj(snapshot)
const removedListIds = new Set()
const localUserListIds = new Set()
const remoteUserListIds = new Set()
for (const l of localListData.userList) localUserListIds.add(l.id)
for (const l of remoteListData.userList) remoteUserListIds.add(l.id)
for (const l of snapshot.userList) {
if (!localUserListIds.has(l.id) || !remoteUserListIds.has(l.id)) removedListIds.add(l.id)
}
let newUserList = []
for (const list of localListData.userList) {
if (removedListIds.has(list.id)) continue
const remoteList = remoteUserListData[list.id]
let newList
if (remoteList) {
newList = mergeListDataFromSnapshot(list, remoteList, snapshotUserListData[list.id], addMusicLocationType)
} else {
newList = { ...list }
}
newUserList.push(newList)
}
remoteListData.userList.forEach((list, index) => {
if (removedListIds.has(list.id)) return
const remoteUpdateTime = list?.locationUpdateTime ?? 0
if (localUserListData[list.id]) {
const localUpdateTime = localUserListData[list.id]?.locationUpdateTime ?? 0
if (localUpdateTime >= remoteUpdateTime) return
// 调整位置
const [newList] = newUserList.splice(newUserList.findIndex(l => l.id == list.id), 1)
newList.locationUpdateTime = localUpdateTime
newUserList.splice(index, 0, newList)
} else {
if (remoteUpdateTime) {
newUserList.splice(index, 0, { ...list })
} else {
newUserList.push({ ...list })
}
}
})
newListData.userList = newUserList
setLocalList(newListData)
setRemotelList(socket, newListData)
return updateSnapshot(socket.data.snapshotFilePath, JSON.stringify({
defaultList: newListData.defaultList,
loveList: newListData.loveList,
userList: newListData.userList,
})).then(() => {
socket.data.isCreatedSnapshot = true
return newListData
})
}
const registerUpdateSnapshotTask = (socket, snapshot) => {
if (!socket.data.isCreatedSnapshot) return
const handleUpdateSnapshot = throttle(({ defaultList, loveList, userList }) => {
if (defaultList != null) snapshot.defaultList = defaultList
if (loveList != null) snapshot.loveList = loveList
if (userList != null) snapshot.userList = userList
updateSnapshot(socket.data.snapshotFilePath, JSON.stringify(snapshot))
}, 2000)
global.lx_event.common.on(COMMON_EVENT_NAME.saveMyList, handleUpdateSnapshot)
socket.on('disconnect', () => {
global.lx_event.common.off(COMMON_EVENT_NAME.saveMyList, handleUpdateSnapshot)
})
}
const syncList = async socket => {
socket.data.snapshotFilePath = path.join(app.getPath('userData'), `snapshot-${Buffer.from(socket.data.keyInfo.clientId).toString('hex').substring(0, 10)}.json`)
let fileData
let isSyncRequired = false
try {
fileData = await fsPromises.readFile(socket.data.snapshotFilePath)
fileData = JSON.parse(fileData)
} catch (err) {
if (err.code !== 'ENOENT') throw err
isSyncRequired = true
}
console.log('isSyncRequired', isSyncRequired)
if (isSyncRequired) return handleSyncList(socket)
return handleMergeListDataFromSnapshot(socket, patchListData(fileData))
}
const checkSyncQueue = async() => {
if (!syncingId) return
await wait()
return checkSyncQueue()
}
module.exports = async(_io, socket) => {
io = _io
await checkSyncQueue()
syncingId = socket.data.keyInfo.clientId
return syncList(socket).then(newListData => {
registerUpdateSnapshotTask(socket, { ...newListData })
return finishedSync(socket)
}).finally(() => {
syncingId = null
})
}

View File

@@ -0,0 +1,93 @@
const { networkInterfaces } = require('os')
const { randomBytes, createCipheriv, createDecipheriv } = require('crypto')
const getStore = require('@common/store')
const STORE_NAME = 'sync'
exports.getAddress = () => {
const nets = networkInterfaces()
const results = []
// console.log(nets)
for (const name of Object.keys(nets)) {
for (const net of nets[name]) {
// Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
if (net.family === 'IPv4' && !net.internal) {
results.push(net.address)
}
}
}
return results
}
let serverId
exports.getServerId = () => {
if (serverId) return serverId
const store = getStore(STORE_NAME)
serverId = store.get('serverId')
if (!serverId) {
serverId = randomBytes(4 * 4).toString('base64')
store.set('serverId', serverId)
}
return serverId
}
let keyInfos
exports.createClientKeyInfo = deviceName => {
const keyInfo = {
clientId: randomBytes(4 * 4).toString('base64'),
key: randomBytes(16).toString('base64'),
iv: randomBytes(16).toString('base64'),
deviceName,
}
const store = getStore(STORE_NAME)
if (!keyInfos) keyInfos = store.get('keys') || {}
if (Object.keys(keyInfos).length > 101) throw new Error('max keys')
keyInfos[keyInfo.clientId] = keyInfo
store.set('keys', keyInfos)
return keyInfo
}
exports.setClientKeyInfo = keyInfo => {
keyInfos[keyInfo.clientId] = keyInfo
const store = getStore(STORE_NAME)
store.set('keys', keyInfos)
}
exports.getClientKeyInfo = clientId => {
if (!keyInfos) {
const store = getStore(STORE_NAME)
keyInfos = store.get('keys') || {}
}
return keyInfos[clientId] || null
}
exports.generateCode = () => {
return Math.random().toString().substring(2, 8)
}
exports.aesEncrypt = (buffer, key, iv) => {
const cipher = createCipheriv('aes-128-cbc', Buffer.from(key, 'base64'), Buffer.from(iv, 'base64'))
return Buffer.concat([cipher.update(buffer), cipher.final()]).toString('base64')
}
exports.aesDecrypt = (text, key, iv) => {
const decipher = createDecipheriv('aes-128-cbc', Buffer.from(key, 'base64'), Buffer.from(iv, 'base64'))
return Buffer.concat([decipher.update(Buffer.from(text, 'base64')), decipher.final()]).toString()
}
exports.encryptMsg = (keyInfo, msg) => {
return msg
// if (!keyInfo) return ''
// return exports.aesEncrypt(msg, keyInfo.key, keyInfo.iv)
}
exports.decryptMsg = (keyInfo, enMsg) => {
return enMsg
// if (!keyInfo) return ''
// let msg = ''
// try {
// msg = exports.aesDecrypt(enMsg, keyInfo.key, keyInfo.iv)
// } catch (err) {
// console.log(err)
// }
// return msg
}

View File

@@ -1,5 +1,5 @@
const { app, Tray, Menu } = require('electron')
const { isWin } = require('../../common/utils')
const { app, Tray, Menu, nativeImage } = require('electron')
// const { isWin } = require('../../common/utils')
const { tray: TRAY_EVENT_NAME, common: COMMON_EVENT_NAME, mainWindow: MAIN_WINDOW_NAME } = require('../events/_name')
const path = require('path')
let isEnableTray = null
@@ -7,16 +7,21 @@ let themeId = null
const themeList = [
{
id: 0,
fileName: 'tray0Template',
fileName: 'trayTemplate',
isNative: true,
},
{
id: 1,
fileName: 'tray1Template',
fileName: 'tray_origin',
isNative: false,
},
{
id: 2,
fileName: 'tray_black',
isNative: false,
},
]
global.lx_event.common.on(COMMON_EVENT_NAME.config, sourceName => {
global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, sourceName => {
if (sourceName === TRAY_EVENT_NAME.name) return
if (themeId !== global.appSetting.tray.themeId) {
themeId = global.appSetting.tray.themeId
@@ -43,11 +48,11 @@ const createTray = () => {
if ((global.modules.tray && !global.modules.tray.isDestroyed()) || !global.appSetting.tray || !global.appSetting.tray.isShow) return
themeId = global.appSetting.tray.themeId
let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName
const iconPath = path.join(global.__static, 'images/tray', isWin ? themeName + '@2x.ico' : themeName + '.png')
let theme = themeList.find(item => item.id === themeId) || themeList[0]
const iconPath = path.join(global.__static, 'images/tray', theme.fileName + '.png')
// 托盘
global.modules.tray = new Tray(iconPath)
global.modules.tray = new Tray(nativeImage.createFromPath(iconPath))
global.modules.tray.setToolTip('洛雪音乐助手')
createMenu(global.modules.tray)
@@ -70,55 +75,63 @@ const destroyTray = () => {
const createMenu = tray => {
if (!global.modules.tray) return
let menu = []
global.modules.mainWindow && menu.push(global.modules.mainWindow.isVisible() ? {
label: '隐藏主界面',
click() {
global.modules.mainWindow.hide()
},
} : {
label: '显示主界面',
click() {
if (!global.modules.mainWindow) return
if (!global.modules.mainWindow.isVisible()) {
global.modules.mainWindow.show()
global.modules.mainWindow && menu.push(global.modules.mainWindow.isVisible()
? {
label: '隐藏主界面',
click() {
global.modules.mainWindow.hide()
},
}
global.modules.mainWindow.restore()
global.modules.mainWindow.focus()
},
})
menu.push(global.appSetting.desktopLyric.enable ? {
label: '关闭桌面歌词',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { enable: false } }, TRAY_EVENT_NAME.name)
},
} : {
label: '开启桌面歌词',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { enable: true } }, TRAY_EVENT_NAME.name)
},
})
menu.push(global.appSetting.desktopLyric.isLock ? {
label: '解锁桌面歌词',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { isLock: false } }, TRAY_EVENT_NAME.name)
},
} : {
label: '锁定桌面歌词',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { isLock: true } }, TRAY_EVENT_NAME.name)
},
})
menu.push(global.appSetting.desktopLyric.isAlwaysOnTop ? {
label: '取消置顶',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { isAlwaysOnTop: false } }, TRAY_EVENT_NAME.name)
},
} : {
label: '置顶歌词',
click() {
global.lx_event.common.setAppConfig({ desktopLyric: { isAlwaysOnTop: true } }, TRAY_EVENT_NAME.name)
},
})
: {
label: '显示主界面',
click() {
if (!global.modules.mainWindow) return
if (!global.modules.mainWindow.isVisible()) {
global.modules.mainWindow.show()
}
global.modules.mainWindow.restore()
global.modules.mainWindow.focus()
},
})
menu.push(global.appSetting.desktopLyric.enable
? {
label: '关闭桌面歌词',
click() {
global.lx_core.setAppConfig({ desktopLyric: { enable: false } }, TRAY_EVENT_NAME.name)
},
}
: {
label: '开启桌面歌词',
click() {
global.lx_core.setAppConfig({ desktopLyric: { enable: true } }, TRAY_EVENT_NAME.name)
},
})
menu.push(global.appSetting.desktopLyric.isLock
? {
label: '解锁桌面歌词',
click() {
global.lx_core.setAppConfig({ desktopLyric: { isLock: false } }, TRAY_EVENT_NAME.name)
},
}
: {
label: '锁定桌面歌词',
click() {
global.lx_core.setAppConfig({ desktopLyric: { isLock: true } }, TRAY_EVENT_NAME.name)
},
})
menu.push(global.appSetting.desktopLyric.isAlwaysOnTop
? {
label: '取消置顶',
click() {
global.lx_core.setAppConfig({ desktopLyric: { isAlwaysOnTop: false } }, TRAY_EVENT_NAME.name)
},
}
: {
label: '置顶歌词',
click() {
global.lx_core.setAppConfig({ desktopLyric: { isAlwaysOnTop: true } }, TRAY_EVENT_NAME.name)
},
})
menu.push({
label: '退出',
click() {
@@ -132,7 +145,7 @@ const createMenu = tray => {
const setTrayImage = themeId => {
if (!global.modules.tray) return
let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName
const iconPath = path.join(global.__static, 'images/tray', isWin ? themeName + '@2x.ico' : themeName + '.png')
global.modules.tray.setImage(iconPath)
let theme = themeList.find(item => item.id === themeId) || themeList[0]
const iconPath = path.join(global.__static, 'images/tray', theme.fileName + '.png')
global.modules.tray.setImage(nativeImage.createFromPath(iconPath))
}

View File

@@ -0,0 +1,2 @@
exports.userApis = []

View File

@@ -0,0 +1,11 @@
const { EventEmitter } = require('events')
const USER_API_EVENT_NAME = require('./name')
class UserApi extends EventEmitter {
status(info) {
this.emit(USER_API_EVENT_NAME.status, info)
}
}
module.exports = UserApi

View File

@@ -0,0 +1,3 @@
module.exports = {
status: 'status',
}

View File

@@ -0,0 +1,44 @@
const Event = require('./event/event')
const eventNames = require('./event/name')
const { closeWindow } = require('./main')
const { getUserApis, importApi, removeApi } = require('./utils')
const { request, cancelRequest, getStatus, loadApi } = require('./rendererEvent/rendererEvent')
// const { getApiList, importApi, removeApi, setApi, getStatus, request, eventNames }
let userApiId
exports.Event = Event
exports.eventNames = eventNames
exports.getApiList = getUserApis
exports.importApi = script => {
return {
apiInfo: importApi(script),
apiList: getUserApis(),
}
}
exports.request = request
exports.cancelRequest = cancelRequest
exports.getStatus = getStatus
exports.removeApi = async ids => {
if (userApiId && ids.includes(userApiId)) {
userApiId = null
await closeWindow()
}
removeApi(ids)
return getUserApis()
}
exports.setApi = async id => {
if (userApiId) {
userApiId = null
await closeWindow()
}
const apiList = getUserApis()
if (!apiList.some(a => a.id === id)) return
userApiId = id
await loadApi(id)
}

View File

@@ -0,0 +1,97 @@
const { BrowserWindow } = require('electron')
const fs = require('fs')
const path = require('path')
// eslint-disable-next-line no-undef
const dir = global.isDev ? __userApi : path.join(__dirname, 'userApi')
const wait = time => new Promise(resolve => setTimeout(() => resolve(), time))
let html = ''
fs.readFile(path.join(dir, 'renderer/user-api.html'), 'utf8', (err, data) => {
if (err) throw new Error('api html read failed, info: ' + err.message)
html = data
})
const denyEvents = [
'new-window',
'will-navigate',
'will-redirect',
'will-attach-webview',
'will-prevent-unload',
'media-started-playing',
]
const winEvent = win => {
win.on('closed', () => {
win = global.modules.userApiWindow = null
})
}
exports.createWindow = async userApi => {
if (global.modules.userApiWindow) return
while (true) {
if (html) break
await wait(100)
}
/**
* Initial window options
*/
global.modules.userApiWindow = new BrowserWindow({
enableRemoteModule: false,
resizable: false,
minimizable: false,
maximizable: false,
fullscreenable: false,
show: false,
webPreferences: {
contextIsolation: true,
// worldSafeExecuteJavaScript: true,
nodeIntegration: false,
spellcheck: false,
autoplayPolicy: 'document-user-activation-required',
enableWebSQL: false,
disableDialogs: true,
webgl: false,
images: false,
preload: path.join(dir, 'renderer/preload.js'),
},
})
for (const eventName of denyEvents) {
global.modules.userApiWindow.webContents.on(eventName, event => {
event.preventDefault()
})
}
global.modules.userApiWindow.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
// eslint-disable-next-line node/no-callback-literal
callback(false)
})
winEvent(global.modules.userApiWindow)
// console.log(html.replace('</body>', `<script>${userApi.script}</script></body>`))
const randomNum = Math.random().toString().substring(2, 10)
global.modules.userApiWindow.loadURL(
'data:text/html;charset=UTF-8,' + encodeURIComponent(html
.replace('<meta http-equiv="Content-Security-Policy" content="default-src \'none\'">',
`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'nonce-${randomNum}';">`)
.replace('</body>', `<script nonce="${randomNum}">${userApi.script}</script></body>`)))
// global.modules.userApiWindow.loadFile(path.join(dir, 'renderer/user-api.html'))
// global.modules.userApiWindow.webContents.openDevTools()
}
exports.closeWindow = async() => {
if (!global.modules.userApiWindow) return
await Promise.all([
global.modules.userApiWindow.webContents.session.clearAuthCache(),
global.modules.userApiWindow.webContents.session.clearStorageData(),
global.modules.userApiWindow.webContents.session.clearCache(),
])
global.modules.userApiWindow.destroy()
global.modules.userApiWindow = null
}

View File

@@ -0,0 +1,232 @@
const { contextBridge, ipcRenderer } = require('electron')
const needle = require('needle')
const { createCipheriv, publicEncrypt, constants, randomBytes, createHash } = require('crypto')
const USER_API_RENDERER_EVENT_NAME = require('../rendererEvent/name')
const sendMessage = (action, status, data, message) => {
ipcRenderer.send(action, { status, data, message })
}
let isInitedApi = false
const EVENT_NAMES = {
request: 'request',
inited: 'inited',
}
const eventNames = Object.values(EVENT_NAMES)
const events = {
request: null,
}
const allSources = ['kw', 'kg', 'tx', 'wy', 'mg']
const supportQualitys = {
kw: ['128k', '320k', 'flac'],
kg: ['128k', '320k', 'flac'],
tx: ['128k', '320k', 'flac'],
wy: ['128k', '320k', 'flac'],
mg: ['128k', '320k', 'flac'],
}
const supportActions = {
kw: ['musicUrl'],
kg: ['musicUrl'],
tx: ['musicUrl'],
wy: ['musicUrl'],
mg: ['musicUrl'],
xm: ['musicUrl'],
}
const handleRequest = (context, { requestKey, data }) => {
// console.log(data)
if (!events.request) return sendMessage(USER_API_RENDERER_EVENT_NAME.response, false, { requestKey }, 'Request event is not defined')
try {
events.request.call(context, { source: data.source, action: data.action, info: data.info }).then(response => {
let sendData = {
requestKey,
}
switch (data.action) {
case 'musicUrl':
sendData.result = {
source: data.source,
action: data.action,
data: {
type: data.info.type,
url: response,
},
}
break
}
sendMessage(USER_API_RENDERER_EVENT_NAME.response, true, sendData)
}).catch(err => {
sendMessage(USER_API_RENDERER_EVENT_NAME.response, false, { requestKey }, err.message)
})
} catch (err) {
sendMessage(USER_API_RENDERER_EVENT_NAME.response, false, { requestKey }, err.message)
}
}
/**
*
* @param {*} context
* @param {*} info {
* openDevTools: false,
* status: true,
* message: 'xxx',
* sources: {
* kw: ['128k', '320k', 'flac'],
* kg: ['128k', '320k', 'flac'],
* tx: ['128k', '320k', 'flac'],
* wy: ['128k', '320k', 'flac'],
* mg: ['128k', '320k', 'flac'],
* }
* }
*/
const handleInit = (context, info) => {
if (!info) {
sendMessage(USER_API_RENDERER_EVENT_NAME.init, false, null, 'Init failed')
// sendMessage(USER_API_RENDERER_EVENT_NAME.init, false, null, typeof info.message === 'string' ? info.message.substring(0, 100) : '')
return
}
if (info.openDevTools === true) {
sendMessage(USER_API_RENDERER_EVENT_NAME.openDevTools)
}
if (!info.status) {
sendMessage(USER_API_RENDERER_EVENT_NAME.init, false, null, 'Init failed')
// sendMessage(USER_API_RENDERER_EVENT_NAME.init, false, null, typeof info.message === 'string' ? info.message.substring(0, 100) : '')
return
}
const sourceInfo = {
sources: {},
}
try {
for (const source of allSources) {
const userSource = info.sources[source]
if (!userSource || userSource.type !== 'music') continue
const qualitys = supportQualitys[source]
const actions = supportActions[source]
sourceInfo.sources[source] = {
type: 'music',
actions: actions.filter(a => userSource.actions.includes(a)),
qualitys: qualitys.filter(q => userSource.qualitys.includes(q)),
}
}
} catch (error) {
console.log(error)
sendMessage(USER_API_RENDERER_EVENT_NAME.init, false, null, error.message)
return
}
sendMessage(USER_API_RENDERER_EVENT_NAME.init, true, sourceInfo)
ipcRenderer.on(USER_API_RENDERER_EVENT_NAME.request, (event, data) => {
handleRequest(context, data)
})
}
contextBridge.exposeInMainWorld('lx', {
EVENT_NAMES,
request(url, { method = 'get', timeout, headers, body, form, formData }, callback) {
let options = { headers }
let data
if (body) {
data = body
} else if (form) {
data = form
// data.content_type = 'application/x-www-form-urlencoded'
options.json = false
} else if (formData) {
data = formData
// data.content_type = 'multipart/form-data'
options.json = false
}
options.response_timeout = timeout
let request = needle.request(method, url, data, options, (err, resp, body) => {
if (!err) {
body = resp.body = resp.raw.toString()
try {
resp.body = JSON.parse(resp.body)
} catch (_) {}
body = resp.body
}
callback(err, {
statusCode: resp.statusCode,
statusMessage: resp.statusMessage,
headers: resp.headers,
bytes: resp.bytes,
raw: resp.raw,
body: body,
}, body)
}).request
return () => {
if (!request.aborted) request.abort()
request = null
}
},
send(eventName, data) {
return new Promise((resolve, reject) => {
if (!eventNames.includes(eventName)) return reject(new Error('The event is not supported: ' + eventName))
switch (eventName) {
case EVENT_NAMES.inited:
if (isInitedApi) return
isInitedApi = true
handleInit(this, data)
break
default:
resolve(new Error('Unknown event name: ' + eventName))
}
})
},
on(eventName, handler) {
if (!eventNames.includes(eventName)) return Promise.reject(new Error('The event is not supported: ' + eventName))
switch (eventName) {
case EVENT_NAMES.request:
events.request = handler
break
}
},
utils: {
crypto: {
aesEncrypt(buffer, mode, key, iv) {
const cipher = createCipheriv(mode, key, iv)
return Buffer.concat([cipher.update(buffer), cipher.final()])
},
rsaEncrypt(buffer, key) {
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
return publicEncrypt({ key: key, padding: constants.RSA_NO_PADDING }, buffer)
},
randomBytes(size) {
return randomBytes(size)
},
md5(str) {
return createHash('md5').update(str).digest('hex')
},
},
buffer: {
from(...args) {
return Buffer.from(...args)
},
bufToString(buf, format) {
return Buffer.from(buf, 'binary').toString(format)
},
},
},
version: '1.1.0',
// removeEvent(eventName, handler) {
// if (!eventNames.includes(eventName)) return Promise.reject(new Error('The event is not supported: ' + eventName))
// let handlers
// switch (eventName) {
// case EVENT_NAMES.request:
// handlers = events.request
// break
// }
// for (let index = 0; index < handlers.length; index++) {
// if (handlers[index] === handler) {
// handlers.splice(index, 1)
// break
// }
// }
// },
// removeAllEvents() {
// for (const handlers of Object.values(events)) {
// handlers.splice(0, handlers.length)
// }
// },
})

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User api</title>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,12 @@
const names = {
init: '',
request: '',
response: '',
openDevTools: '',
}
for (const key of Object.keys(names)) {
names[key] = `userApi_${key}`
}
module.exports = names

View File

@@ -0,0 +1,82 @@
const { mainOn, mainSend } = require('@common/ipc')
const USER_API_RENDERER_EVENT_NAME = require('../rendererEvent/name')
const { createWindow } = require('../main')
const { getUserApis } = require('../utils')
let userApi
let status = { status: true }
const requestQueue = new Map()
const timeouts = {}
const handleInit = (event, { status, message, data: apiInfo }) => {
// console.log('inited')
if (!status) {
console.log('init failed:', message)
global.lx_event.userApi.status(status = { status: false, apiInfo: userApi, message })
return
}
global.lx_event.userApi.status(status = { status: true, apiInfo: { ...userApi, sources: apiInfo.sources } })
}
const handleResponse = (event, { status, data: { requestKey, result }, message }) => {
const request = requestQueue.get(requestKey)
if (!request) return
requestQueue.delete(requestKey)
clearTimeout(timeouts[requestKey])
delete timeouts[requestKey]
if (status) {
request[0](result)
} else {
request[1](new Error(message))
}
}
const handleOpenDevTools = () => {
if (global.modules.userApiWindow) {
global.modules.userApiWindow.webContents.openDevTools()
}
}
mainOn(USER_API_RENDERER_EVENT_NAME.init, handleInit)
mainOn(USER_API_RENDERER_EVENT_NAME.response, handleResponse)
mainOn(USER_API_RENDERER_EVENT_NAME.openDevTools, handleOpenDevTools)
exports.loadApi = async apiId => {
if (!apiId) return global.lx_event.userApi.status(status = { status: false, message: 'api id is null' })
userApi = getUserApis().find(api => api.id == apiId)
console.log('load api', userApi.name)
await createWindow(userApi)
// if (!userApi) return global.lx_event.userApi.status(status = { status: false, message: 'api script is not found' })
// if (!global.modules.userApiWindow) {
// global.lx_event.userApi.status(status = { status: false, message: 'user api runtime is not defined' })
// throw new Error('user api window is not defined')
// }
// // const path = require('path')
// // // eslint-disable-next-line no-undef
// // userApi.script = require('fs').readFileSync(path.join(global.isDev ? __userApi : __dirname, 'renderer/test-api.js')).toString()
// console.log('load api', userApi.name)
// mainSend(global.modules.userApiWindow, USER_API_RENDERER_EVENT_NAME.init, { userApi })
}
exports.cancelRequest = requestKey => {
if (!requestQueue.has(requestKey)) return
const request = requestQueue.get(requestKey)
request[1](new Error('Cancel request'))
requestQueue.delete(requestKey)
clearTimeout(timeouts[requestKey])
delete timeouts[requestKey]
}
exports.request = ({ requestKey, data }) => new Promise((resolve, reject) => {
if (!userApi) return reject(new Error('user api is not load'))
// const requestKey = `request__${Math.random().toString().substring(2)}`
timeouts[requestKey] = setTimeout(() => {
exports.cancelRequest(requestKey)
}, 20000)
requestQueue.set(requestKey, [resolve, reject, data])
mainSend(global.modules.userApiWindow, USER_API_RENDERER_EVENT_NAME.request, { requestKey, data })
})
exports.getStatus = () => status

View File

@@ -0,0 +1,44 @@
const { userApis: defaultUserApis } = require('../config')
const getStore = require('@common/store')
let userApis
exports.getUserApis = () => {
const electronStore_userApi = getStore('userApi')
if (userApis) return userApis
userApis = electronStore_userApi.get('userApis')
if (!userApis) {
userApis = defaultUserApis
electronStore_userApi.set('userApis', userApis)
}
return userApis
}
exports.importApi = script => {
let scriptInfo = script.split(/\r?\n/)
let name = scriptInfo[1] || ''
let description = scriptInfo[2] || ''
name = name.startsWith(' * @name ') ? name.replace(' * @name ', '').trim() : `user_api_${new Date().toLocaleString()}`
if (name.length > 24) name = name.substring(0, 24) + '...'
description = description.startsWith(' * @description ') ? description.replace(' * @description ', '').trim() : ''
if (description.length > 36) description = description.substring(0, 36) + '...'
const apiInfo = {
id: `user_api_${Math.random().toString().substring(2, 5)}_${Date.now()}`,
name,
description,
script,
}
userApis.push(apiInfo)
getStore('userApi').set('userApis', userApis)
return apiInfo
}
exports.removeApi = ids => {
for (let index = userApis.length - 1; index > -1; index--) {
if (ids.includes(userApis[index].id)) {
userApis.splice(index, 1)
ids.splice(index, 1)
}
}
getStore('userApi').set('userApis', userApis)
}

View File

@@ -13,7 +13,8 @@ const setLrcConfig = () => {
mainSend(global.modules.lyricWindow, ipcWinLyricNames.set_lyric_config, {
config: desktopLyric,
languageId: global.appSetting.langId,
isShowLyricTransition: global.appSetting.player.isShowLyricTransition,
isShowLyricTranslation: global.appSetting.player.isShowLyricTranslation,
isPlayLxlrc: global.appSetting.player.isPlayLxlrc,
})
if (isLock != desktopLyric.isLock) {
isLock = desktopLyric.isLock
@@ -48,7 +49,7 @@ const setLrcConfig = () => {
}
}
}
global.lx_event.common.on(COMMON_EVENT_NAME.config, name => {
global.lx_event.common.on(COMMON_EVENT_NAME.configStatus, name => {
if (WIN_LYRIC_EVENT_NAME.name === name) return
setLrcConfig()
})
@@ -76,5 +77,5 @@ global.lx_event.hotKey.on(HOT_KEY_EVENT_NAME.keyDown, ({ type, key }) => {
}
desktopLyricSetting[settingKey] = !desktopLyricSetting[settingKey]
global.lx_event.common.setAppConfig({ desktopLyric: desktopLyricSetting }, null)
global.lx_core.setAppConfig({ desktopLyric: desktopLyricSetting }, null)
})

View File

@@ -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')
@@ -21,13 +21,13 @@ const setLyricsConfig = debounce(config => {
// if (y != null) bounds.y = y
// if (width != null) bounds.width = width
// if (height != null) bounds.height = height
global.lx_event.common.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name)
global.lx_core.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name)
}, 500)
const winEvent = lyricWindow => {
// let bounds
// lyricWindow.on('close', event => {
// if (global.isQuitting || !global.appSetting.tray.isToTray || (!isWin && !global.isTrafficLightClose)) {
// if (global.isQuitting || !global.appSetting.tray.isShow || (!isWin && !global.isTrafficLightClose)) {
// lyricWindow.setProgressBar(-1)
// return
// }
@@ -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')
}
})
}
@@ -109,9 +113,10 @@ const createWindow = () => {
alwaysOnTop: isAlwaysOnTop,
skipTaskbar: true,
webPreferences: {
// contextIsolation: true,
contextIsolation: false,
webSecurity: !global.isDev,
nodeIntegration: true,
spellcheck: false, // 禁用拼写检查器
},
})

View File

@@ -20,11 +20,16 @@ mainOn(ipcWinLyricNames.get_lyric_info, (event, action) => {
})
mainOn(ipcWinLyricNames.set_lyric_config, (event, config) => {
global.lx_event.common.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name)
global.lx_core.setAppConfig({ desktopLyric: config }, WIN_LYRIC_EVENT_NAME.name)
})
mainHandle(ipcWinLyricNames.get_lyric_config, async() => {
return { config: global.appSetting.desktopLyric, languageId: global.appSetting.langId, isShowLyricTransition: global.appSetting.player.isShowLyricTransition }
return {
config: global.appSetting.desktopLyric,
languageId: global.appSetting.langId,
isShowLyricTranslation: global.appSetting.player.isShowLyricTranslation,
isPlayLxlrc: global.appSetting.player.isPlayLxlrc,
}
})
mainOn(ipcWinLyricNames.set_win_bounds, (event, options) => {

View File

@@ -1,9 +1,11 @@
const { mainWindow: MAIN_WINDOW_EVENT_NAME } = require('../events/_name')
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
const { NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
mainOn(ipcMainWindowNames.set_app_setting, (event, config) => {
mainHandle(ipcMainWindowNames.set_app_setting, (event, config) => {
if (!config) return
global.lx_event.common.setAppConfig(config, MAIN_WINDOW_EVENT_NAME.name)
global.lx_core.setAppConfig(config, MAIN_WINDOW_EVENT_NAME.name)
return global.appSetting
})
mainHandle(ipcMainWindowNames.get_setting, async() => ({ setting: global.appSetting, version: global.appSettingVersion }))

View File

@@ -1,12 +1,8 @@
const Store = require('electron-store')
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
const getStore = require('@common/store')
const electronStore_data = new Store({
name: 'data',
})
mainHandle(ipcMainWindowNames.get_data, async(event, path) => electronStore_data.get(path))
mainHandle(ipcMainWindowNames.get_data, async(event, path) => getStore('data').get(path))
mainOn(ipcMainWindowNames.save_data, (event, { path, data }) => electronStore_data.set(path, data))
mainOn(ipcMainWindowNames.save_data, (event, { path, data }) => getStore('data').set(path, data))

View File

@@ -1,10 +1,8 @@
const Store = require('electron-store')
const { mainSend, NAMES: { mainWindow: ipcMainWindowNames }, mainOn, mainHandle } = require('../../common/ipc')
const { mainWindow: MAIN_WINDOW_EVENT_NAME, hotKey: HOT_KEY_EVENT_NAME } = require('../events/_name')
const getStore = require('@common/store')
const electronStore_hotKey = new Store({
name: 'hotKey',
})
// const { registerHotkey, unRegisterHotkey } = require('../modules/hotKey/utils')
// mainHandle(ipcMainWindowNames.set_hot_key_config, async(event, { action, data }) => {
@@ -19,10 +17,13 @@ const electronStore_hotKey = new Store({
// }
// })
mainHandle(ipcMainWindowNames.get_hot_key, async() => ({
local: electronStore_hotKey.get('local'),
global: electronStore_hotKey.get('global'),
}))
mainHandle(ipcMainWindowNames.get_hot_key, async() => {
const electronStore_hotKey = getStore('hotKey')
return {
local: electronStore_hotKey.get('local'),
global: electronStore_hotKey.get('global'),
}
})
mainOn(ipcMainWindowNames.quit, () => global.lx_event.mainWindow.quit())
mainOn(ipcMainWindowNames.min_toggle, () => global.lx_event.mainWindow.toggleMinimize())

View File

@@ -17,7 +17,14 @@ require('./getDataPath')
require('./showDialog')
require('./playList')
require('./data')
require('./lyric')
require('./musicUrl')
require('./systemFonts')
require('./wait')
require('./xm_verify')
// require('./kw_decodeLyric')
require('./userApi')
require('./sync')
require('./s2t')
require('./kw_decodeLyric')

View File

@@ -0,0 +1,10 @@
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
const getStore = require('@common/store')
mainHandle(ipcMainWindowNames.get_lyric, async(event, id) => getStore('lyrics', true, false).get(id) || {})
mainOn(ipcMainWindowNames.save_lyric, (event, { id, lyrics }) => getStore('lyrics', true, false).set(id, lyrics))
mainOn(ipcMainWindowNames.clear_lyric, () => getStore('lyrics', true, false).clear())

View File

@@ -0,0 +1,10 @@
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
const getStore = require('@common/store')
mainHandle(ipcMainWindowNames.get_music_url, async(event, id) => getStore('musicUrls', true, false).get(id) || '')
mainOn(ipcMainWindowNames.save_music_url, (event, { id, url }) => getStore('musicUrls', true, false).set(id, url))
mainOn(ipcMainWindowNames.clear_music_url, () => getStore('musicUrls', true, false).clear())

View File

@@ -1,23 +1,35 @@
const Store = require('electron-store')
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames }, mainHandle } = require('../../common/ipc')
const getStore = require('@common/store')
let electronStore_list
mainHandle(ipcMainWindowNames.get_playlist, async(event, isIgnoredError = false) => {
if (!electronStore_list) {
electronStore_list = new Store({
name: 'playList',
clearInvalidConfig: !isIgnoredError,
})
}
const electronStore_list = getStore('playList', isIgnoredError, false)
return {
defaultList: electronStore_list.get('defaultList'),
loveList: electronStore_list.get('loveList'),
tempList: electronStore_list.get('tempList'),
userList: electronStore_list.get('userList'),
downloadList: electronStore_list.get('downloadList'),
downloadList: getStore('downloadList').get('list'),
}
})
mainOn(ipcMainWindowNames.save_playlist, (event, { type, data }) => electronStore_list && electronStore_list.set(type, data))
const handleSaveList = ({ defaultList, loveList, userList, tempList }) => {
let data = {}
if (defaultList != null) data.defaultList = defaultList
if (loveList != null) data.loveList = loveList
if (userList != null) data.userList = userList
if (tempList != null) data.tempList = tempList
getStore('playList').set(data)
}
mainOn(ipcMainWindowNames.save_playlist, (event, { type, data }) => {
switch (type) {
case 'myList':
handleSaveList(data)
global.lx_event.common.saveMyList(data)
break
case 'downloadList':
getStore('downloadList').set('list', data)
break
}
})

View File

@@ -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')
})

View File

@@ -1,4 +1,4 @@
const { mainOn, mainSend, NAMES: { mainWindow: ipcMainWindowNames } } = require('../../common/ipc')
const { mainOn, mainSend, NAMES: { mainWindow: ipcMainWindowNames } } = require('@common/ipc')
mainOn(ipcMainWindowNames.set_lyric_info, (event, info) => {

View File

@@ -0,0 +1,33 @@
const { mainSend, NAMES: { mainWindow: ipcMainWindowNames }, mainOn, mainHandle } = require('@common/ipc')
const { eventNames, modules, startServer, stopServer, getStatus, generateCode } = require('../modules/sync')
mainOn(ipcMainWindowNames.sync_action_list, (event, { action, data }) => {
modules.list.sendListAction(action, data)
})
mainHandle(ipcMainWindowNames.sync_enable, (event, { enable, port }) => {
return enable ? startServer(port) : stopServer()
})
mainHandle(ipcMainWindowNames.sync_get_status, () => {
return getStatus()
})
mainHandle(ipcMainWindowNames.sync_generate_code, () => {
return generateCode()
})
mainOn(ipcMainWindowNames.sync_list, (event, { action, data }) => {
global.lx_event.sync.sync_handle_list({ action, data })
})
global.lx_event.sync.on(eventNames.sync_action_list, ({ action, data }) => {
mainSend(global.modules.mainWindow, ipcMainWindowNames.sync_action_list, { action, data })
})
global.lx_event.sync.on(eventNames.status, status => {
mainSend(global.modules.mainWindow, ipcMainWindowNames.sync_status, status)
})
global.lx_event.sync.on(eventNames.sync_list, ({ action, data }) => {
mainSend(global.modules.mainWindow, ipcMainWindowNames.sync_list, { action, data })
})

View File

@@ -0,0 +1,5 @@
const { mainHandle, NAMES: { mainWindow: ipcMainWindowNames } } = require('@common/ipc')
const { getFonts } = require('@main/utils/fontManage')
mainHandle(ipcMainWindowNames.get_system_fonts, getFonts)

Some files were not shown because too many files have changed in this diff Show More