Skip to content

Commit 6fa80b0

Browse files
authored
Publish 0.0.4
1. 【功能】播放列表支持拖拽排序 2. 【功能】支持多语言。本次支持简体中文、繁体中文、英文、西班牙语 3. 【功能】支持歌词翻译功能(需要插件实现 getLyric 方法) 4. 【功能】新增最近播放,默认保存最近播放的 500 首歌 5. 【功能】新增小窗模式 6. 【功能】新增音频设备移除时的行为设置,现在可以让拔掉耳机的时候停止播放了 7. 【功能】新增单独的主题页,可以在主题市场中直接使用主题;本地.mftheme 主题可以直接拖拽到播放器安装 8. 【优化】本地音乐会尝试读取本地路径下的同名 .lrc 文件作为歌词;同时会读取同名 -tr.lrc 文件作为翻译 9. 【修复】修复部分情况下本地歌词无法读取的问题 10. 【修复】修复 linux 托盘点击无效的问题
2 parents e0fd99d + aed5919 commit 6fa80b0

File tree

276 files changed

+10477
-4560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+10477
-4560
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@typescript-eslint/no-empty-function": "warn",
2323
"no-empty": "warn",
2424
"no-useless-catch": "warn",
25-
"prefer-const": "warn"
25+
"prefer-const": "warn",
26+
"quotes": [1, "double"]
2627
}
2728
}

.github/workflows/autobuild.yml

+26-25
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ jobs:
55
build-windows:
66
runs-on: windows-latest
77
steps:
8-
- uses: actions/checkout@v3
9-
- uses: actions/setup-node@v3
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-node@v4
1010
with:
11-
node-version: 16
12-
- run: echo (node -p -e '`VERSION=${require(\"./package.json\").version}`') >> $Env:GITHUB_ENV
11+
node-version: 18
12+
- run: echo (node -p -e '`VERSION=${require("./package.json").version}`') >> $Env:GITHUB_ENV
1313
- run: npm install
1414
- run: npm run package
1515
- uses: maotoumao/inno-setup-action-cli@main
1616
with:
1717
filepath: ./release/build-windows.iss
1818
variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
1919
- name: Upload Setup
20-
uses: actions/upload-artifact@v3
20+
uses: actions/upload-artifact@v4
2121
with:
2222
name: windows-release
2323
path: ./out/MusicFreeSetup.exe
@@ -28,19 +28,19 @@ jobs:
2828
files: ./out/MusicFree-win32-x64
2929
dest: MusicFree-win32-x64-portable.zip
3030
- name: Upload Portable
31-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
3232
with:
3333
name: windows-portable-release
3434
path: ${{ github.workspace }}/MusicFree-win32-x64-portable.zip
3535

3636
build-windows-legacy:
3737
runs-on: windows-latest
3838
steps:
39-
- uses: actions/checkout@v3
40-
- uses: actions/setup-node@v3
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
4141
with:
42-
node-version: 16
43-
- run: echo (node -p -e '`VERSION=${require(\"./package.json\").version}`') >> $Env:GITHUB_ENV
42+
node-version: 18
43+
- run: echo (node -p -e '`VERSION=${require("./package.json").version}`') >> $Env:GITHUB_ENV
4444
- run: npm install
4545
- run: npm install electron@22
4646
- run: npm run package
@@ -49,7 +49,7 @@ jobs:
4949
filepath: ./release/build-windows.iss
5050
variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
5151
- name: Upload Setup
52-
uses: actions/upload-artifact@v3
52+
uses: actions/upload-artifact@v4
5353
with:
5454
name: windows-legacy-release
5555
path: ./out/MusicFreeSetup.exe
@@ -60,61 +60,62 @@ jobs:
6060
files: ./out/MusicFree-win32-x64
6161
dest: MusicFree-win32-x64-legacy-portable.zip
6262
- name: Upload Portable
63-
uses: actions/upload-artifact@v3
63+
uses: actions/upload-artifact@v4
6464
with:
6565
name: windows-legacy-portable-release
6666
path: ${{ github.workspace }}/MusicFree-win32-x64-legacy-portable.zip
6767

6868
build-macos-x64:
6969
runs-on: macos-latest
7070
steps:
71-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
7272
- uses: actions/setup-python@v4
7373
with:
7474
python-version: '3.10'
75-
- uses: actions/setup-node@v3
75+
- uses: actions/setup-node@v4
7676
with:
77-
node-version: 16
77+
node-version: 18
7878
- run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
7979
- run: npm install
80-
- run: npm run make
80+
- run: npm run make -- --arch="x64"
81+
- run: ls ./out/make
8182
- name: Upload Setup
82-
uses: actions/upload-artifact@v3
83+
uses: actions/upload-artifact@v4
8384
with:
8485
name: macos-x64-dmg-release
8586
path: ./out/make/MusicFree-${{ env.VERSION }}-x64.dmg
8687

8788
build-macos-arm64:
8889
runs-on: macos-latest
8990
steps:
90-
- uses: actions/checkout@v3
91+
- uses: actions/checkout@v4
9192
- uses: actions/setup-python@v4
9293
with:
9394
python-version: '3.10'
94-
- uses: actions/setup-node@v3
95+
- uses: actions/setup-node@v4
9596
with:
96-
node-version: 16
97+
node-version: 18
9798
- run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
9899
- run: npm install
99100
- run: npm run make -- --arch="arm64"
100101
- name: Upload Setup
101-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
102103
with:
103104
name: macos-arm64-dmg-release
104105
path: ./out/make/MusicFree-${{ env.VERSION }}-arm64.dmg
105106

106107
build-ubuntu:
107108
runs-on: ubuntu-latest
108109
steps:
109-
- uses: actions/checkout@v3
110-
- uses: actions/setup-node@v3
110+
- uses: actions/checkout@v4
111+
- uses: actions/setup-node@v4
111112
with:
112-
node-version: 16
113+
node-version: 18
113114
- run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
114115
- run: npm install
115116
- run: npm run make
116117
- name: Upload Setup
117-
uses: actions/upload-artifact@v3
118+
uses: actions/upload-artifact@v4
118119
with:
119120
name: ubuntu-release
120121
path: ./out/make/deb/x64/

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"files.associations": {
4+
"*.html": "html",
5+
"map": "cpp"
6+
}
7+
}

changelog.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
`2024-06.16 v0.0.4`
2+
3+
1. 【功能】播放列表支持拖拽排序
4+
2. 【功能】支持多语言。本次支持简体中文、繁体中文、英文、西班牙语
5+
3. 【功能】支持歌词翻译功能(需要插件实现 getLyric 方法)
6+
4. 【功能】新增最近播放,默认保存最近播放的 500 首歌
7+
5. 【功能】新增小窗模式
8+
6. 【功能】新增音频设备移除时的行为设置,现在可以让拔掉耳机的时候停止播放了
9+
7. 【功能】新增单独的主题页,可以在主题市场中直接使用主题;本地.mftheme 主题可以直接拖拽到播放器安装
10+
8. 【优化】本地音乐会尝试读取本地路径下的同名 .lrc 文件作为歌词;同时会读取同名 -tr.lrc 文件作为翻译
11+
9. 【修复】修复部分情况下本地歌词无法读取的问题
12+
10. 【修复】修复 linux 托盘点击无效的问题
13+
114
`2023-12.23 v0.0.3`
15+
216
1. 【功能】插件支持拖拽排序,该排序会影响到搜索结果、排行榜、热门歌单的展示顺序
317
2. 【功能】播放列表支持多选快捷键(Ctrl + A 全选、按住 Shift 批量选择)
418
3. 【功能】本地音乐新增搜索功能
@@ -23,6 +37,7 @@
2337
22. 【修复】重写了本地歌单逻辑,修复收藏歌单部分情况下无法点击的问题
2438

2539
`2023-11.5 v0.0.2`
40+
2641
1. 【功能】支持播放 .m3u8 源
2742
2. 【功能】打开播放列表时锚定到当前正在播放的歌曲
2843
3. 【功能】新增搜索歌词功能,你可以在歌曲详情页右键点击,并单击【搜索歌词】功能唤起搜索弹窗
@@ -40,18 +55,19 @@
4055
15. 【修复】修复包含特殊字符时下载失败的问题
4156
16. 【修复, macos】修复 macos 图标显示异常的问题
4257
17. 【修复, linux】修复 linux 无法最小化的问题
43-
18. 【打包】新增 windows 免安装版、mac m1/m2版、linux版
58+
18. 【打包】新增 windows 免安装版、mac m1/m2 版、linux 版
4459
19. 【版本号】桌面版后缀取消 -alpha 后缀,以正式版本号发布。
4560

4661
`2023.9.5 v0.0.1-alpha.0`
62+
4763
1. 【功能】新增搜索历史记录
4864
2. 【功能】新增下载歌词、调整歌词字体大小功能
4965
3. 【功能】桌面歌词支持自定义字体
5066
4. 【功能】支持选择音频输出设备
5167
5. 【功能】下载歌曲功能
5268
6. 【功能】设置中新增快捷键配置
53-
7. 【功能】支持windows8.1及以下系统(下载链接中的windows-legacy-setup.exe,win10/11下载哪个exe都行
69+
7. 【功能】支持 windows8.1 及以下系统(下载链接中的 windows-legacy-setup.exe,win10/11 下载哪个 exe 都行
5470
8. 【优化】调整左下角歌曲信息的可响应区域
55-
9. 【修复】修复本地歌曲只显示100首的问题
56-
10. 【修复】修复mac系统无法移动桌面歌词的问题
71+
9. 【修复】修复本地歌曲只显示 100 首的问题
72+
10. 【修复】修复 mac 系统无法移动桌面歌词的问题
5773
11. 【修复】修复本地插件安装失败的问题

config/webpack.main.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const mainConfig: Configuration = {
2121
"@": path.join(__dirname, "../src"),
2222
"@main": path.join(__dirname, "../src/main"),
2323
"@native": path.join(__dirname, "../src/main/native_modules"),
24+
"@shared": path.join(__dirname, "../src/shared")
2425
},
2526
},
2627
output: {

config/webpack.plugins.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import type IForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
1+
import type IForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
22

33
// eslint-disable-next-line @typescript-eslint/no-var-requires
4-
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
4+
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
5+
const relocateLoader = require("@vercel/webpack-asset-relocator-loader");
56

67
export const plugins = [
78
new ForkTsCheckerWebpackPlugin({
8-
logger: 'webpack-infrastructure',
9+
logger: "webpack-infrastructure",
910
}),
10-
11+
{
12+
apply(compiler: any) {
13+
compiler.hooks.compilation.tap(
14+
"webpack-asset-relocator-loader",
15+
(compilation: any) => {
16+
relocateLoader.initAssetCache(compilation, "native_modules");
17+
}
18+
);
19+
},
20+
},
1121
];

config/webpack.renderer.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const rendererConfig: Configuration = {
5555
"@": path.join(__dirname, "../src"),
5656
"@renderer": path.join(__dirname, "../src/renderer"),
5757
"@renderer-lrc": path.join(__dirname, "../src/renderer-lrc"),
58+
"@shared": path.join(__dirname, "../src/shared")
5859
},
5960
},
6061
externals: process.platform !== "darwin" ? ["fsevents"] : undefined,

forge.config.ts

+39-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import type { ForgeConfig } from "@electron-forge/shared-types";
2-
import { MakerSquirrel } from "@electron-forge/maker-squirrel";
32
import { MakerZIP } from "@electron-forge/maker-zip";
43
import { MakerDeb } from "@electron-forge/maker-deb";
5-
import { MakerRpm } from "@electron-forge/maker-rpm";
64
import { MakerDMG } from "@electron-forge/maker-dmg";
75
import { WebpackPlugin } from "@electron-forge/plugin-webpack";
86

@@ -15,8 +13,12 @@ const config: ForgeConfig = {
1513
appBundleId: "fun.upup.musicfree",
1614
icon: path.resolve(__dirname, "res/logo"),
1715
executableName: "MusicFree",
18-
extraResource: [
19-
path.resolve(__dirname, 'res')
16+
extraResource: [path.resolve(__dirname, "res")],
17+
protocols: [
18+
{
19+
name: "MusicFree",
20+
schemes: ["musicfree"],
21+
},
2022
],
2123
},
2224
rebuildConfig: {},
@@ -27,16 +29,20 @@ const config: ForgeConfig = {
2729
// setupMsi: "MusicFreeInstaller",
2830
// }),
2931
new MakerZIP({}, ["darwin"]),
30-
new MakerDMG({
31-
// background
32-
format: 'ULFO'
33-
}, ['darwin']),
32+
new MakerDMG(
33+
{
34+
// background
35+
format: "ULFO",
36+
},
37+
["darwin"]
38+
),
3439
// new MakerRpm({}),
3540
new MakerDeb({
3641
options: {
3742
name: "MusicFree",
38-
bin: "MusicFree"
39-
}
43+
bin: "MusicFree",
44+
mimeType: ["x-scheme-handler/musicfree"],
45+
},
4046
}),
4147
],
4248
plugins: [
@@ -62,27 +68,40 @@ const config: ForgeConfig = {
6268
js: "./src/preload/extension.ts",
6369
},
6470
},
71+
{
72+
html: "./src/renderer-minimode/document/index.html",
73+
js: "./src/renderer-minimode/document/index.tsx",
74+
name: "minimode_window",
75+
preload: {
76+
js: "./src/preload/extension.ts",
77+
},
78+
},
6579
/** webworkers */
6680
{
6781
js: "./src/webworkers/downloader.ts",
68-
name: 'worker_downloader',
69-
nodeIntegration: true
82+
name: "worker_downloader",
83+
nodeIntegration: true,
7084
},
7185
{
7286
js: "./src/webworkers/local-file-watcher.ts",
73-
name: 'local_file_watcher',
74-
nodeIntegration: true
75-
}
87+
name: "local_file_watcher",
88+
nodeIntegration: true,
89+
},
90+
{
91+
js: "./src/webworkers/db-worker.ts",
92+
name: "db",
93+
nodeIntegration: true,
94+
},
7695
],
7796
},
7897
}),
7998
{
80-
name: '@timfish/forge-externals-plugin',
99+
name: "@timfish/forge-externals-plugin",
81100
config: {
82-
externals: ['sharp'],
83-
includeDeps: true
84-
}
85-
}
101+
externals: ["sharp"],
102+
includeDeps: true,
103+
},
104+
},
86105
],
87106
};
88107

0 commit comments

Comments
 (0)