mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-08 10:00:50 +08:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
939dc85d7d | ||
|
|
c4831966c1 | ||
|
|
50aebcf8de | ||
|
|
75d1225b40 | ||
|
|
c251ec9dcf | ||
|
|
00a251b5b6 | ||
|
|
7e59cfee05 | ||
|
|
c3dd03cc13 | ||
|
|
999cd6526b | ||
|
|
77bb06c0d6 | ||
|
|
85302c611a | ||
|
|
0f42bfc6cb | ||
|
|
5bcef29f10 | ||
|
|
a9fb487332 | ||
|
|
8e1259d2aa | ||
|
|
70f1044dd9 | ||
|
|
e2ebbe12e4 | ||
|
|
af9117ee5f | ||
|
|
6bc168c5bd | ||
|
|
89c6b11110 | ||
|
|
b9287e1c36 | ||
|
|
1a0e449e13 | ||
|
|
07f6152c56 | ||
|
|
56adac0d4e | ||
|
|
452e1d1129 | ||
|
|
34ba2250bf | ||
|
|
1005718c07 | ||
|
|
3527da17da | ||
|
|
9bf513d35d | ||
|
|
35b798b69e | ||
|
|
9535183405 | ||
|
|
6d7ba6dbae | ||
|
|
a9adb6be36 | ||
|
|
bee5445b6e | ||
|
|
316d5932e3 | ||
|
|
a5d3ff359c | ||
|
|
77f3069e67 | ||
|
|
f3a9f8b979 | ||
|
|
29ba231a7d | ||
|
|
cb2baeadf5 | ||
|
|
4575e4f26d | ||
|
|
dc8957dcf2 | ||
|
|
c83ad48ef4 | ||
|
|
67370b9072 | ||
|
|
93022691e2 | ||
|
|
0df86b583b | ||
|
|
df3a7994cb | ||
|
|
8fb4c4df68 | ||
|
|
56922caa40 | ||
|
|
abbbf7e771 | ||
|
|
6d9235902a | ||
|
|
659c9f9a4c | ||
|
|
8f0728d9db | ||
|
|
8f9c989815 | ||
|
|
d8734f8302 | ||
|
|
74b9d73241 | ||
|
|
10421fa4d2 | ||
|
|
d05a63c5e3 | ||
|
|
a9f76c7952 | ||
|
|
70677dfb14 | ||
|
|
e9ef7123e7 | ||
|
|
5fbe4c3ad4 | ||
|
|
bce02532ef | ||
|
|
9003de8d4b | ||
|
|
c98f5bb608 | ||
|
|
6e67263766 | ||
|
|
e91667a2e6 | ||
|
|
7306722fcf | ||
|
|
76db7e3ad6 | ||
|
|
8aaabf4b65 | ||
|
|
292ab56be8 | ||
|
|
5ab3143fdd | ||
|
|
08f7e5adfe | ||
|
|
2a8d0f2066 | ||
|
|
fb8b4c9341 | ||
|
|
dc99331911 | ||
|
|
7ae6e041b5 | ||
|
|
1171e0f9e7 | ||
|
|
df236e491c | ||
|
|
4368c05b80 | ||
|
|
d24d3d63b8 | ||
|
|
ad57673129 | ||
|
|
ad51f57bd7 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -30,6 +30,9 @@ resources/android/**/*
|
||||
android/app/release
|
||||
|
||||
.cursor
|
||||
.windsurf
|
||||
.agent
|
||||
|
||||
|
||||
.auto-imports.d.ts
|
||||
.components.d.ts
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
echo "对已暂存文件运行 lint-staged..."
|
||||
npx lint-staged
|
||||
|
||||
echo "运行类型检查..."
|
||||
npm run typecheck
|
||||
npm run typecheck
|
||||
|
||||
echo "所有检查通过,准备提交..."
|
||||
@@ -1,2 +1,7 @@
|
||||
echo "对已暂存文件运行 lint-staged..."
|
||||
npx lint-staged
|
||||
|
||||
echo "运行类型检查..."
|
||||
npm run typecheck
|
||||
npm run typecheck
|
||||
|
||||
echo "所有检查通过,准备提交..."
|
||||
52
CHANGELOG.md
52
CHANGELOG.md
@@ -1,38 +1,48 @@
|
||||
# 更新日志
|
||||
|
||||
## v4.9.0
|
||||
## v5.0.0
|
||||
|
||||
### ✨ 新功能
|
||||
|
||||
- 重新设计pc端歌词页面Mini播放栏
|
||||
- 添加清除歌曲自定义解析功能
|
||||
- 添加Cookie登录功能及自动获取等相关管理设置 ([16aeaf2](https://github.com/algerkong/AlgerMusicPlayer/commit/16aeaf2)) - 支持通过Cookie方式登录,提供更便捷的登录体验
|
||||
- 添加UID登录功能,优化登录流程 ([daa8e75](https://github.com/algerkong/AlgerMusicPlayer/commit/daa8e75)) - 新增用户ID直接登录方式
|
||||
- 添加主题根据系统切换功能 ([d5ba218](https://github.com/algerkong/AlgerMusicPlayer/commit/d5ba218)) - 支持跟随系统主题自动切换明暗模式
|
||||
- 桌面歌词添加主题颜色面板组件 ([d1f5c8a](https://github.com/algerkong/AlgerMusicPlayer/commit/d1f5c8a)) - 为桌面歌词提供丰富的主题颜色自定义选项
|
||||
- 增强播放速度控制,添加滑块控制并改善播放安全性 ([8fb382e](https://github.com/algerkong/AlgerMusicPlayer/commit/8fb382e)) 感谢[Qumo](https://github.com/Hellodwadawd12312312)的pr
|
||||
- 添加日语和韩语国际化支持,并优化语言相关代码 ([3062156](https://github.com/algerkong/AlgerMusicPlayer/commit/3062156))
|
||||
- 添加繁体中文本地化支持 ([2cc03cb](https://github.com/algerkong/AlgerMusicPlayer/commit/2cc03cb)) 感谢[dongguacute](https://github.com/dongguacute)的pr
|
||||
- 播放速度设置弹窗标题添加速度显示 ([aeb7f03](https://github.com/algerkong/AlgerMusicPlayer/commit/aeb7f03))
|
||||
- LX Music 音源脚本导入
|
||||
- 逐字歌词,支持全屏歌词和桌面歌词同步显示
|
||||
- 心动模式播放
|
||||
- 移动设备整体页面风格和效果优化
|
||||
- 移动端添加平板模式设置
|
||||
- 歌词页面样式控制优化 支持背景、宽度、字体粗细等个性化设置
|
||||
- 历史日推查看
|
||||
- 播放记录热力图
|
||||
- 历史记录支持本地和云端记录
|
||||
- 用户页面收藏专辑展示
|
||||
- 添加 GPU 硬件加速设置
|
||||
- 菜单展开状态保存 - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
- 搜索建议 - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
- 歌词繁体中文翻译模块,集成 OpenCC 引擎 - 感谢 [Leko](https://github.com/lekoOwO) 的贡献
|
||||
- 自定义 API源 支持 [自定义源文档](https://github.com/algerkong/AlgerMusicPlayer/blob/main/docs/custom-api-readme.md) - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
|
||||
### 🐛 Bug 修复
|
||||
|
||||
- 修复mac快捷键关闭窗口报错的问题 ([67ef4d7](https://github.com/algerkong/AlgerMusicPlayer/commit/67ef4d7))
|
||||
- 修复mini窗口恢复时导致的应用窗口变小问题 ([9b3019d](https://github.com/algerkong/AlgerMusicPlayer/commit/9b3019d))
|
||||
- 修复歌单列表页面翻页类型问题 ([e489ab4](https://github.com/algerkong/AlgerMusicPlayer/commit/e489ab4))
|
||||
- 修复歌曲初始化问题 ([b7a58a0](https://github.com/algerkong/AlgerMusicPlayer/commit/b7a58a0))
|
||||
- 修复音量调整不同步的问题 ([679089e](https://github.com/algerkong/AlgerMusicPlayer/commit/679089e))
|
||||
- 修复菜单显示不全的问题,添加滚动条 ([09ccd9f](https://github.com/algerkong/AlgerMusicPlayer/commit/09ccd9f))
|
||||
- 修复随机播放顺序异常
|
||||
- 修复音源解析错误处理
|
||||
- 修复 Mini 播放栏主题颜色问题
|
||||
- 修复桌面歌词透明模式标题栏显示
|
||||
- 修复逐字歌词字间距
|
||||
- 修复远程控制设置无法保存
|
||||
- 修复下载无损格式返回 HiRes 音质 - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
- 兼容 pnpm 包管理器 - 感谢 [Leko](https://github.com/lekoOwO) 的贡献
|
||||
|
||||
### 🎨 优化
|
||||
|
||||
- 更新 eslint 和 prettier 配置,格式化代码 ([c08c2cb](https://github.com/algerkong/AlgerMusicPlayer/commit/c08c2cb))
|
||||
- 优化类型处理和登录功能 ([3ba85f3](https://github.com/algerkong/AlgerMusicPlayer/commit/3ba85f3))
|
||||
- 优化Cookie相关文字描述 ([1597fbf](https://github.com/algerkong/AlgerMusicPlayer/commit/1597fbf))
|
||||
- 音源解析缓存
|
||||
- 完善多语言国际化
|
||||
- 优化播放检测和错误处理
|
||||
- FLAC 元数据和封面图片处理 - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
- 日推不感兴趣调用官方接口 - 感谢 [harenchi](https://github.com/souvenp) 的贡献
|
||||
- 代码提交流程优化,添加 lint-staged
|
||||
|
||||
## 赞赏支持☕️
|
||||
|
||||
[赞赏列表](http://donate.alger.fun/)
|
||||
[赞赏列表](https://donate.alger.fun/donate)
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -16,5 +16,7 @@
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.microphone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
62
docs/custom-api-readme.md
Normal file
62
docs/custom-api-readme.md
Normal file
@@ -0,0 +1,62 @@
|
||||
## 🎵 自定义音源API配置
|
||||
|
||||
现在支持通过导入一个简单的 JSON 配置文件来对接第三方的音乐解析 API。这将提供极大的灵活性,可以接入任意第三方音源。
|
||||
|
||||
### 如何使用
|
||||
|
||||
1. 前往 **设置 -> 播放设置 -> 音源设置**。
|
||||
2. 在 **自定义 API 设置** 区域,点击 **“导入 JSON 配置”** 按钮。
|
||||
3. 选择你已经编写好的 `xxx.json` 配置文件。
|
||||
4. 导入成功后,程序将优先使用你的自定义 API 进行解析。
|
||||
|
||||
### JSON 配置文件格式说明
|
||||
|
||||
导入的配置文件必须是一个合法的 JSON 文件,并包含以下字段:
|
||||
|
||||
| 字段名 | 类型 | 是否必须 | 描述 |
|
||||
| ----------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | `string` | 是 | API 名称,将显示在应用的 UI 界面上。 |
|
||||
| `apiUrl` | `string` | 是 | API 的基础请求地址。 |
|
||||
| `method` | `string` | 否 | HTTP 请求方法。可以是 `"GET"` 或 `"POST"`。**如果省略,默认为 "GET"**。 |
|
||||
| `params` | `object` | 是 | 请求时需要发送的参数。对于 `GET` 请求,它们会作为查询字符串;对于 `POST` 请求,它们会作为请求体。 |
|
||||
| `qualityMapping` | `object` | 否 | **音质映射表**。用于将应用内部的音质值(如 `"lossless"`)翻译成你的 API 需要的特定值。如果省略,则直接使用应用内部值。 |
|
||||
| `responseUrlPath` | `string` | 是 | **URL提取路径**。用于从 API 返回的 JSON 响应中找到最终可播放的音乐链接。支持点 `.` 和方括号 `[]` 语法来访问嵌套对象和数组。 |
|
||||
|
||||
#### 占位符
|
||||
|
||||
在 `params` 对象的值中,你可以使用以下占位符,程序在请求时会自动替换它们:
|
||||
|
||||
- `{songId}`: 将被替换为当前歌曲的 ID。
|
||||
- `{quality}`: 将被替换为当前用户设置的音质字符串 (例如, `"higher"`, `"lossless"`)。
|
||||
|
||||
#### 音质值列表
|
||||
|
||||
应用内部使用的音质值如下,你可以在 `qualityMapping` 中使用它们作为**键**:
|
||||
`standard`, `higher`, `exhigh`, `lossless`, `hires`, `jyeffect`, `sky`, `dolby`, `jymaster`
|
||||
|
||||
### 示例
|
||||
|
||||
假设有一个 API 如下:
|
||||
`https://api.example.com/music?song_id=12345&bitrate=320000`
|
||||
它返回的 JSON 是:
|
||||
`{ "code": 200, "data": { "play_url": "http://..." } }`
|
||||
|
||||
那么对应的 JSON 配置文件应该是:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Example API",
|
||||
"apiUrl": "https://api.example.com/music",
|
||||
"method": "GET",
|
||||
"params": {
|
||||
"song_id": "{songId}",
|
||||
"bitrate": "{quality}"
|
||||
},
|
||||
"qualityMapping": {
|
||||
"higher": "128000",
|
||||
"exhigh": "320000",
|
||||
"lossless": "999000"
|
||||
},
|
||||
"responseUrlPath": "data.play_url"
|
||||
}
|
||||
```
|
||||
BIN
docs/image6.png
BIN
docs/image6.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 2.1 MiB |
@@ -1,45 +0,0 @@
|
||||
appId: com.electron.app
|
||||
productName: electron-lan-file
|
||||
directories:
|
||||
buildResources: build
|
||||
files:
|
||||
- '!**/.vscode/*'
|
||||
- '!src/*'
|
||||
- '!electron.vite.config.{js,ts,mjs,cjs}'
|
||||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||
asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: electron-lan-file
|
||||
nsis:
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
mac:
|
||||
entitlementsInherit: build/entitlements.mac.plist
|
||||
extendInfo:
|
||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
||||
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
||||
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
||||
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
||||
notarize: false
|
||||
dmg:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
linux:
|
||||
target:
|
||||
- AppImage
|
||||
- snap
|
||||
- deb
|
||||
maintainer: electronjs.org
|
||||
category: Utility
|
||||
appImage:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
npmRebuild: false
|
||||
publish:
|
||||
provider: generic
|
||||
url: https://example.com/auto-updates
|
||||
electronDownload:
|
||||
mirror: https://npmmirror.com/mirrors/electron/
|
||||
@@ -1,5 +1,5 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
|
||||
import { defineConfig } from 'electron-vite';
|
||||
import { resolve } from 'path';
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
|
||||
@@ -8,12 +8,8 @@ import viteCompression from 'vite-plugin-compression';
|
||||
import VueDevTools from 'vite-plugin-vue-devtools';
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
main: {},
|
||||
preload: {},
|
||||
renderer: {
|
||||
resolve: {
|
||||
alias: {
|
||||
@@ -40,7 +36,8 @@ export default defineConfig({
|
||||
],
|
||||
publicDir: resolve('resources'),
|
||||
server: {
|
||||
host: '0.0.0.0'
|
||||
host: '0.0.0.0',
|
||||
port: 2389
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
129
package.json
129
package.json
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "AlgerMusicPlayer",
|
||||
"version": "4.9.0",
|
||||
"version": "5.0.0",
|
||||
"description": "Alger Music Player",
|
||||
"author": "Alger <algerkc@qq.com>",
|
||||
"main": "./out/main/index.js",
|
||||
"homepage": "https://github.com/algerkong/AlgerMusicPlayer",
|
||||
"scripts": {
|
||||
"prepare": "husky",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write ./src",
|
||||
"lint": "eslint ./src --fix",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
||||
@@ -22,80 +22,97 @@
|
||||
"build:mac": "npm run build && electron-builder --mac",
|
||||
"build:linux": "npm run build && electron-builder --linux"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,vue,js}": [
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{ts,tsx,vue,js,css,scss,md,json}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.1",
|
||||
"@electron-toolkit/preload": "^3.0.2",
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
"@unblockneteasemusic/server": "^0.27.8-patch.1",
|
||||
"@unblockneteasemusic/server": "^0.27.10",
|
||||
"cors": "^2.8.5",
|
||||
"electron-store": "^8.1.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"electron-store": "^8.2.0",
|
||||
"electron-updater": "^6.6.2",
|
||||
"electron-window-state": "^5.0.3",
|
||||
"express": "^4.18.2",
|
||||
"file-type": "^21.0.0",
|
||||
"font-list": "^1.5.1",
|
||||
"express": "^4.22.1",
|
||||
"file-type": "^21.1.1",
|
||||
"flac-tagger": "^1.0.7",
|
||||
"font-list": "^1.6.0",
|
||||
"form-data": "^4.0.5",
|
||||
"husky": "^9.1.7",
|
||||
"music-metadata": "^11.2.3",
|
||||
"jsencrypt": "^3.5.4",
|
||||
"music-metadata": "^11.10.3",
|
||||
"netease-cloud-music-api-alger": "^4.26.1",
|
||||
"node-fetch": "^2.7.0",
|
||||
"node-id3": "^0.2.9",
|
||||
"node-machine-id": "^1.1.12",
|
||||
"vue-i18n": "^11.1.3"
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"sharp": "^0.34.5",
|
||||
"vue-i18n": "^11.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/eslint-config": "^2.1.0",
|
||||
"@electron-toolkit/eslint-config-ts": "^3.1.0",
|
||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||
"@eslint/js": "^9.31.0",
|
||||
"@rushstack/eslint-patch": "^1.10.3",
|
||||
"@tailwindcss/postcss7-compat": "^2.2.4",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@rushstack/eslint-patch": "^1.15.0",
|
||||
"@types/howler": "^2.2.12",
|
||||
"@types/node": "^20.14.8",
|
||||
"@types/node": "^20.19.26",
|
||||
"@types/node-fetch": "^2.6.13",
|
||||
"@types/tinycolor2": "^1.4.6",
|
||||
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
||||
"@typescript-eslint/parser": "^8.30.1",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"@vue/compiler-sfc": "^3.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
||||
"@typescript-eslint/parser": "^8.49.0",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/compiler-sfc": "^3.5.25",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.5.0",
|
||||
"@vue/runtime-core": "^3.5.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/runtime-core": "^3.5.25",
|
||||
"@vueuse/core": "^11.3.0",
|
||||
"@vueuse/electron": "^11.3.0",
|
||||
"@vueuse/electron": "^13.9.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"axios": "^1.7.7",
|
||||
"autoprefixer": "^10.4.22",
|
||||
"axios": "^1.13.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"electron": "^35.2.0",
|
||||
"electron-builder": "^25.1.8",
|
||||
"electron-vite": "^3.1.0",
|
||||
"eslint": "^9.0.0",
|
||||
"electron": "^39.2.7",
|
||||
"electron-builder": "^26.0.12",
|
||||
"electron-vite": "^5.0.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-prettier": "^5.5.3",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-vue": "^10.3.0",
|
||||
"eslint-plugin-vue-scoped-css": "^2.11.0",
|
||||
"globals": "^16.3.0",
|
||||
"eslint-plugin-vue": "^10.6.2",
|
||||
"eslint-plugin-vue-scoped-css": "^2.12.0",
|
||||
"globals": "^16.5.0",
|
||||
"howler": "^2.2.4",
|
||||
"lint-staged": "^15.5.2",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^15.0.4",
|
||||
"naive-ui": "^2.41.0",
|
||||
"pinia": "^3.0.1",
|
||||
"pinyin-match": "^1.2.6",
|
||||
"postcss": "^8.5.3",
|
||||
"prettier": "^3.6.2",
|
||||
"remixicon": "^4.6.0",
|
||||
"sass": "^1.86.0",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"marked": "^15.0.12",
|
||||
"naive-ui": "^2.43.2",
|
||||
"pinia": "^3.0.4",
|
||||
"pinyin-match": "^1.2.10",
|
||||
"postcss": "^8.5.6",
|
||||
"prettier": "^3.7.4",
|
||||
"remixicon": "^4.7.0",
|
||||
"sass": "^1.96.0",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"tunajs": "^1.0.15",
|
||||
"typescript": "^5.5.2",
|
||||
"unplugin-auto-import": "^19.1.1",
|
||||
"unplugin-vue-components": "^28.4.1",
|
||||
"vite": "^6.2.2",
|
||||
"typescript": "^5.9.3",
|
||||
"unplugin-auto-import": "^19.3.0",
|
||||
"unplugin-vue-components": "^28.8.0",
|
||||
"vite": "^6.4.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-vue-devtools": "7.7.2",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-tsc": "^2.0.22"
|
||||
"vue": "^3.5.25",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-router": "^4.6.4",
|
||||
"vue-tsc": "^2.2.12"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.alger.music",
|
||||
@@ -132,6 +149,12 @@
|
||||
"gatekeeperAssess": false,
|
||||
"entitlements": "build/entitlements.mac.plist",
|
||||
"entitlementsInherit": "build/entitlements.mac.plist",
|
||||
"extendInfo": {
|
||||
"NSMicrophoneUsageDescription": "AlgerMusicPlayer needs access to the microphone for audio visualization.",
|
||||
"NSCameraUsageDescription": "Application requests access to the device's camera.",
|
||||
"NSDocumentsFolderUsageDescription": "Application requests access to the user's Documents folder.",
|
||||
"NSDownloadsFolderUsageDescription": "Application requests access to the user's Downloads folder."
|
||||
},
|
||||
"notarize": false,
|
||||
"identity": null,
|
||||
"type": "distribution",
|
||||
@@ -191,7 +214,15 @@
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"shortcutName": "AlgerMusicPlayer",
|
||||
"include": "build/installer.nsh"
|
||||
"include": "build/installer.nsh",
|
||||
"deleteAppDataOnUninstall": true,
|
||||
"uninstallDisplayName": "AlgerMusicPlayer"
|
||||
}
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"electron",
|
||||
"esbuild"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
51
src/i18n/lang/en-US/bilibili.ts
Normal file
51
src/i18n/lang/en-US/bilibili.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export default {
|
||||
player: {
|
||||
loading: 'Loading audio...',
|
||||
retry: 'Retry',
|
||||
playNow: 'Play Now',
|
||||
loadingTitle: 'Loading...',
|
||||
totalDuration: 'Total Duration: {duration}',
|
||||
partsList: 'Parts List ({count} episodes)',
|
||||
playStarted: 'Playback started',
|
||||
switchingPart: 'Switching to part: {part}',
|
||||
preloadingNext: 'Preloading next part: {part}',
|
||||
playingCurrent: 'Playing current selected part: {name}',
|
||||
num: 'M',
|
||||
errors: {
|
||||
invalidVideoId: 'Invalid video ID',
|
||||
loadVideoDetailFailed: 'Failed to load video details',
|
||||
loadPartInfoFailed: 'Unable to load video part information',
|
||||
loadAudioUrlFailed: 'Failed to get audio playback URL',
|
||||
videoDetailNotLoaded: 'Video details not loaded',
|
||||
missingParams: 'Missing required parameters',
|
||||
noAvailableAudioUrl: 'No available audio URL found',
|
||||
loadPartAudioFailed: 'Failed to load part audio URL',
|
||||
audioListEmpty: 'Audio list is empty, please retry',
|
||||
currentPartNotFound: 'Current part audio not found',
|
||||
audioUrlFailed: 'Failed to get audio URL',
|
||||
playFailed: 'Playback failed, please retry',
|
||||
getAudioUrlFailed: 'Failed to get audio URL, please retry',
|
||||
audioNotFound: 'Corresponding audio not found, please retry',
|
||||
preloadFailed: 'Failed to preload next part',
|
||||
switchPartFailed: 'Failed to load audio URL when switching parts'
|
||||
},
|
||||
console: {
|
||||
loadingDetail: 'Loading Bilibili video details',
|
||||
detailData: 'Bilibili video detail data',
|
||||
multipleParts: 'Video has multiple parts, total {count}',
|
||||
noPartsData: 'Video has no parts or part data is empty',
|
||||
loadingAudioSource: 'Loading audio source',
|
||||
generatedAudioList: 'Generated audio list, total {count}',
|
||||
getDashAudioUrl: 'Got dash audio URL',
|
||||
getDurlAudioUrl: 'Got durl audio URL',
|
||||
loadingPartAudio: 'Loading part audio URL: {part}, cid: {cid}',
|
||||
loadPartAudioFailed: 'Failed to load part audio URL: {part}',
|
||||
switchToPart: 'Switching to part: {part}',
|
||||
audioNotFoundInList: 'Corresponding audio item not found',
|
||||
preparingToPlay: 'Preparing to play current selected part: {name}',
|
||||
preloadingNextPart: 'Preloading next part: {part}',
|
||||
playingSelectedPart: 'Playing current selected part: {name}, audio URL: {url}',
|
||||
preloadNextFailed: 'Failed to preload next part'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -40,9 +40,13 @@ export default {
|
||||
},
|
||||
viewMore: 'View More',
|
||||
noMore: 'No more',
|
||||
selectAll: 'Select All',
|
||||
expand: 'Expand',
|
||||
collapse: 'Collapse',
|
||||
songCount: '{count} songs',
|
||||
language: 'Language',
|
||||
today: 'Today',
|
||||
yesterday: 'Yesterday',
|
||||
tray: {
|
||||
show: 'Show',
|
||||
quit: 'Quit',
|
||||
@@ -52,6 +56,5 @@ export default {
|
||||
pause: 'Pause',
|
||||
play: 'Play',
|
||||
favorite: 'Favorite'
|
||||
},
|
||||
language: 'Language'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,6 +52,31 @@ export default {
|
||||
copyFailed: 'Copy failed',
|
||||
backgroundDownload: 'Background Download'
|
||||
},
|
||||
disclaimer: {
|
||||
title: 'Terms of Use',
|
||||
warning:
|
||||
'This application is a development test version. Functions are not yet perfect, and there may be many problems and bugs. It is for learning and exchange only.',
|
||||
item1:
|
||||
'This application is for personal learning, research and technical exchange only. Please do not use it for any commercial purposes.',
|
||||
item2:
|
||||
'Please delete it within 24 hours after downloading. If you need to use it for a long time, please support the genuine music service.',
|
||||
item3:
|
||||
'By using this application, you understand and assume the relevant risks. The developer is not responsible for any loss.',
|
||||
agree: 'I have read and agree',
|
||||
disagree: 'Disagree and Exit'
|
||||
},
|
||||
donate: {
|
||||
title: 'Support Developer',
|
||||
subtitle: 'Your support is my motivation',
|
||||
tip: 'Donation is completely voluntary. All functions can be used normally without donation. Thank you for your understanding and support!',
|
||||
wechat: 'WeChat',
|
||||
alipay: 'Alipay',
|
||||
wechatQR: 'WeChat QR Code',
|
||||
alipayQR: 'Alipay QR Code',
|
||||
scanTip: 'Please use your phone to scan the QR code above to donate',
|
||||
enterApp: 'Enter App',
|
||||
noForce: 'No forced donation, click to enter'
|
||||
},
|
||||
coffee: {
|
||||
title: 'Buy me a coffee',
|
||||
alipay: 'Alipay',
|
||||
@@ -119,7 +144,11 @@ export default {
|
||||
addToPlaylist: 'Add to Playlist',
|
||||
addToPlaylistSuccess: 'Add to Playlist Success',
|
||||
operationFailed: 'Operation Failed',
|
||||
songsAlreadyInPlaylist: 'Songs already in playlist'
|
||||
songsAlreadyInPlaylist: 'Songs already in playlist',
|
||||
historyRecommend: 'Daily History',
|
||||
fetchDatesFailed: 'Failed to fetch dates',
|
||||
fetchSongsFailed: 'Failed to fetch songs',
|
||||
noSongs: 'No songs'
|
||||
},
|
||||
playlist: {
|
||||
import: {
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
export default {
|
||||
title: 'Play History',
|
||||
heatmapTitle: 'Heatmap',
|
||||
playCount: '{count}',
|
||||
getHistoryFailed: 'Failed to get play history'
|
||||
getHistoryFailed: 'Failed to get play history',
|
||||
categoryTabs: {
|
||||
songs: 'Songs',
|
||||
playlists: 'Playlists',
|
||||
albums: 'Albums'
|
||||
},
|
||||
tabs: {
|
||||
all: 'All Records',
|
||||
local: 'Local Records',
|
||||
cloud: 'Cloud Records'
|
||||
},
|
||||
getCloudRecordFailed: 'Failed to get cloud records',
|
||||
needLogin: 'Please login with cookie to view cloud records',
|
||||
merging: 'Merging records...',
|
||||
noDescription: 'No description',
|
||||
noData: 'No records',
|
||||
newKey: 'New translation',
|
||||
heatmap: {
|
||||
title: 'Play Heatmap',
|
||||
loading: 'Loading data...',
|
||||
unit: 'plays',
|
||||
footerText: 'Hover to view details',
|
||||
playCount: 'Played {count} times',
|
||||
topSongs: 'Top songs of the day',
|
||||
times: 'times',
|
||||
totalPlays: 'Total Plays',
|
||||
activeDays: 'Active Days',
|
||||
noData: 'No play records',
|
||||
colorTheme: 'Color Theme',
|
||||
colors: {
|
||||
green: 'Green',
|
||||
blue: 'Blue',
|
||||
orange: 'Orange',
|
||||
purple: 'Purple',
|
||||
red: 'Red'
|
||||
},
|
||||
mostPlayedSong: 'Most Played Song',
|
||||
mostActiveDay: 'Most Active Day',
|
||||
latestNightSong: 'Latest Night Song'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,7 +45,8 @@ export default {
|
||||
phoneLoginFailed: 'Phone login failed, please check if phone number and password are correct',
|
||||
autoGetCookieSuccess: 'Auto get Cookie successful',
|
||||
autoGetCookieFailed: 'Auto get Cookie failed',
|
||||
autoGetCookieTip: 'Will open NetEase Cloud Music login page, please complete login and close the window',
|
||||
autoGetCookieTip:
|
||||
'Will open NetEase Cloud Music login page, please complete login and close the window',
|
||||
qrCheckFailed: 'Failed to check QR code status, please refresh and try again',
|
||||
qrLoading: 'Loading QR code...',
|
||||
qrExpired: 'QR code has expired, please click to refresh',
|
||||
@@ -58,5 +59,6 @@ export default {
|
||||
qrGenerating: 'Generating QR code...'
|
||||
},
|
||||
qrTitle: 'NetEase Cloud Music QR Code Login',
|
||||
uidWarning: 'Note: UID login is only for viewing user public information and cannot access features that require login permissions.'
|
||||
uidWarning:
|
||||
'Note: UID login is only for viewing user public information and cannot access features that require login permissions.'
|
||||
};
|
||||
|
||||
@@ -14,6 +14,9 @@ export default {
|
||||
addCorrection: 'Add {num} seconds',
|
||||
subtractCorrection: 'Subtract {num} seconds',
|
||||
playFailed: 'Play Failed, Play Next Song',
|
||||
parseFailedPlayNext: 'Song parsing failed, playing next',
|
||||
consecutiveFailsError:
|
||||
'Playback error, possibly due to network issues or invalid source. Please switch playlist or try again later',
|
||||
playMode: {
|
||||
sequence: 'Sequence',
|
||||
loop: 'Loop',
|
||||
@@ -29,7 +32,8 @@ export default {
|
||||
list: 'Next'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: 'No lyrics, please enjoy'
|
||||
noLrc: 'No lyrics, please enjoy',
|
||||
noAutoScroll: 'This lyrics does not support auto-scroll'
|
||||
},
|
||||
reparse: {
|
||||
title: 'Select Music Source',
|
||||
@@ -39,7 +43,9 @@ export default {
|
||||
warning: 'Please select a music source',
|
||||
bilibiliNotSupported: 'Bilibili videos do not support reparsing',
|
||||
processing: 'Processing...',
|
||||
clear: 'Clear Custom Source'
|
||||
clear: 'Clear Custom Source',
|
||||
customApiFailed: 'Custom API parsing failed, trying built-in sources...',
|
||||
customApiError: 'Custom API request error, trying built-in sources...'
|
||||
},
|
||||
playBar: {
|
||||
expand: 'Expand Lyrics',
|
||||
@@ -50,6 +56,7 @@ export default {
|
||||
eq: 'Equalizer',
|
||||
playList: 'Play List',
|
||||
reparse: 'Reparse',
|
||||
miniPlayBar: 'Mini Play Bar',
|
||||
playMode: {
|
||||
sequence: 'Sequence',
|
||||
loop: 'Loop',
|
||||
@@ -63,7 +70,17 @@ export default {
|
||||
favorite: 'Favorite {name}',
|
||||
unFavorite: 'Unfavorite {name}',
|
||||
playbackSpeed: 'Playback Speed',
|
||||
advancedControls: 'Advanced Controls'
|
||||
advancedControls: 'Advanced Controls',
|
||||
intelligenceMode: {
|
||||
title: 'Intelligence Mode',
|
||||
needCookieLogin: 'Please login with Cookie method to use Intelligence Mode',
|
||||
noFavoritePlaylist: 'Favorite playlist not found',
|
||||
noLikedSongs: 'You have no liked songs yet',
|
||||
loading: 'Loading Intelligence Mode',
|
||||
success: 'Loaded {count} songs',
|
||||
failed: 'Failed to get Intelligence Mode list',
|
||||
error: 'Intelligence Mode error'
|
||||
}
|
||||
},
|
||||
eq: {
|
||||
title: 'Equalizer',
|
||||
@@ -89,6 +106,11 @@ export default {
|
||||
custom: 'Custom'
|
||||
}
|
||||
},
|
||||
// Playback settings
|
||||
settings: {
|
||||
title: 'Playback Settings',
|
||||
playbackSpeed: 'Playback Speed'
|
||||
},
|
||||
// Sleep timer related
|
||||
sleepTimer: {
|
||||
title: 'Sleep Timer',
|
||||
@@ -109,7 +131,10 @@ export default {
|
||||
timerEnded: 'Sleep timer ended',
|
||||
playbackStopped: 'Music playback stopped',
|
||||
minutesRemaining: '{minutes} min remaining',
|
||||
songsRemaining: '{count} songs remaining'
|
||||
songsRemaining: '{count} songs remaining',
|
||||
activeTime: 'Timer Active',
|
||||
activeSongs: 'Counting Songs',
|
||||
activeEnd: 'End After List'
|
||||
},
|
||||
playList: {
|
||||
clearAll: 'Clear Playlist',
|
||||
|
||||
@@ -11,7 +11,8 @@ export default {
|
||||
},
|
||||
loading: {
|
||||
more: 'Loading...',
|
||||
failed: 'Search failed'
|
||||
failed: 'Search failed',
|
||||
searching: 'Searching...'
|
||||
},
|
||||
noMore: 'No more results',
|
||||
error: {
|
||||
@@ -23,5 +24,8 @@ export default {
|
||||
playlist: 'Playlist',
|
||||
mv: 'MV',
|
||||
bilibili: 'Bilibili'
|
||||
}
|
||||
},
|
||||
history: 'Search History',
|
||||
hot: 'Hot Searches',
|
||||
suggestions: 'Search Suggestions'
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
network: 'Network Settings',
|
||||
system: 'System Management',
|
||||
donation: 'Donation',
|
||||
regard: 'About'
|
||||
about: 'About'
|
||||
},
|
||||
basic: {
|
||||
themeMode: 'Theme Mode',
|
||||
@@ -50,7 +50,17 @@ export default {
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
}
|
||||
},
|
||||
gpuAcceleration: 'GPU Acceleration',
|
||||
gpuAccelerationDesc:
|
||||
'Enable or disable hardware acceleration, can improve rendering performance but may increase GPU load',
|
||||
gpuAccelerationRestart:
|
||||
'Changing GPU acceleration settings requires application restart to take effect',
|
||||
gpuAccelerationChangeSuccess:
|
||||
'GPU acceleration settings updated, restart application to take effect',
|
||||
gpuAccelerationChangeError: 'Failed to update GPU acceleration settings',
|
||||
tabletMode: 'Tablet Mode',
|
||||
tabletModeDesc: 'Enabling tablet mode allows using PC-style interface on mobile devices'
|
||||
},
|
||||
playback: {
|
||||
quality: 'Audio Quality',
|
||||
@@ -80,7 +90,63 @@ export default {
|
||||
autoPlayDesc: 'Auto resume playback when reopening the app',
|
||||
showStatusBar: 'Show Status Bar',
|
||||
showStatusBarContent:
|
||||
'You can display the music control function in your mac status bar (effective after a restart)'
|
||||
'You can display the music control function in your mac status bar (effective after a restart)',
|
||||
fallbackParser: 'Fallback Parser (GD Music)',
|
||||
fallbackParserDesc:
|
||||
'When "GD Music" is checked and regular sources fail, this service will be used.',
|
||||
parserGD: 'GD Music (Built-in)',
|
||||
parserCustom: 'Custom API',
|
||||
|
||||
// Source labels
|
||||
sourceLabels: {
|
||||
migu: 'Migu',
|
||||
kugou: 'Kugou',
|
||||
pyncmd: 'NetEase (Built-in)',
|
||||
bilibili: 'Bilibili',
|
||||
gdmusic: 'GD Music',
|
||||
custom: 'Custom API'
|
||||
},
|
||||
|
||||
customApi: {
|
||||
sectionTitle: 'Custom API Settings',
|
||||
importConfig: 'Import JSON Config',
|
||||
currentSource: 'Current Source',
|
||||
notImported: 'No custom source imported yet.',
|
||||
importSuccess: 'Successfully imported source: {name}',
|
||||
importFailed: 'Import failed: {message}',
|
||||
enableHint: 'Import a JSON config file to enable',
|
||||
status: {
|
||||
imported: 'Custom Source Imported',
|
||||
notImported: 'Not Imported'
|
||||
}
|
||||
},
|
||||
lxMusic: {
|
||||
tabs: {
|
||||
sources: 'Source Selection',
|
||||
lxMusic: 'LX Music',
|
||||
customApi: 'Custom API'
|
||||
},
|
||||
scripts: {
|
||||
title: 'Imported Scripts',
|
||||
importLocal: 'Import Local',
|
||||
importOnline: 'Import Online',
|
||||
urlPlaceholder: 'Enter LX Music Script URL',
|
||||
importBtn: 'Import',
|
||||
empty: 'No imported LX Music scripts',
|
||||
notConfigured: 'Not configured (Configure in LX Music Tab)',
|
||||
importHint: 'Import compatible custom API plugins to extend sources',
|
||||
noScriptWarning: 'Please import LX Music script first',
|
||||
noSelectionWarning: 'Please select an LX Music source first',
|
||||
notFound: 'Source not found',
|
||||
switched: 'Switched to source: {name}',
|
||||
deleted: 'Deleted source: {name}',
|
||||
enterUrl: 'Please enter script URL',
|
||||
invalidUrl: 'Invalid URL format',
|
||||
invalidScript: 'Invalid LX Music script, globalThis.lx code not found',
|
||||
nameRequired: 'Name cannot be empty',
|
||||
renameSuccess: 'Rename successful'
|
||||
}
|
||||
}
|
||||
},
|
||||
application: {
|
||||
closeAction: 'Close Action',
|
||||
@@ -184,6 +250,7 @@ export default {
|
||||
display: 'Display',
|
||||
interface: 'Interface',
|
||||
typography: 'Typography',
|
||||
background: 'Background',
|
||||
mobile: 'Mobile'
|
||||
},
|
||||
pureMode: 'Pure Mode',
|
||||
@@ -206,6 +273,12 @@ export default {
|
||||
medium: 'Medium',
|
||||
large: 'Large'
|
||||
},
|
||||
fontWeight: 'Font Weight',
|
||||
fontWeightMarks: {
|
||||
thin: 'Thin',
|
||||
normal: 'Normal',
|
||||
bold: 'Bold'
|
||||
},
|
||||
letterSpacing: 'Letter Spacing',
|
||||
letterSpacingMarks: {
|
||||
compact: 'Compact',
|
||||
@@ -218,6 +291,7 @@ export default {
|
||||
default: 'Default',
|
||||
loose: 'Loose'
|
||||
},
|
||||
contentWidth: 'Content Width',
|
||||
mobileLayout: 'Mobile Layout',
|
||||
layoutOptions: {
|
||||
default: 'Default',
|
||||
@@ -231,7 +305,51 @@ export default {
|
||||
full: 'Full Screen'
|
||||
},
|
||||
lyricLines: 'Lyric Lines',
|
||||
mobileUnavailable: 'This setting is only available on mobile devices'
|
||||
mobileUnavailable: 'This setting is only available on mobile devices',
|
||||
// Background settings
|
||||
background: {
|
||||
useCustomBackground: 'Use Custom Background',
|
||||
backgroundMode: 'Background Mode',
|
||||
modeOptions: {
|
||||
solid: 'Solid',
|
||||
gradient: 'Gradient',
|
||||
image: 'Image',
|
||||
css: 'CSS'
|
||||
},
|
||||
solidColor: 'Select Color',
|
||||
presetColors: 'Preset Colors',
|
||||
customColor: 'Custom Color',
|
||||
gradientEditor: 'Gradient Editor',
|
||||
gradientColors: 'Gradient Colors',
|
||||
gradientDirection: 'Gradient Direction',
|
||||
directionOptions: {
|
||||
toBottom: 'Top to Bottom',
|
||||
toRight: 'Left to Right',
|
||||
toBottomRight: 'Top Left to Bottom Right',
|
||||
angle45: '45 Degrees',
|
||||
toTop: 'Bottom to Top',
|
||||
toLeft: 'Right to Left'
|
||||
},
|
||||
addColor: 'Add Color',
|
||||
removeColor: 'Remove Color',
|
||||
imageUpload: 'Upload Image',
|
||||
imagePreview: 'Image Preview',
|
||||
clearImage: 'Clear Image',
|
||||
imageBlur: 'Blur',
|
||||
imageBrightness: 'Brightness',
|
||||
customCss: 'Custom CSS Style',
|
||||
customCssPlaceholder: 'Enter CSS style, e.g.: background: linear-gradient(...)',
|
||||
customCssHelp: 'Supports any CSS background property',
|
||||
reset: 'Reset to Default',
|
||||
fileSizeLimit: 'Image size limit: 20MB',
|
||||
invalidImageFormat: 'Invalid image format',
|
||||
imageTooLarge: 'Image too large, please select an image smaller than 20MB'
|
||||
}
|
||||
},
|
||||
translationEngine: 'Lyric Translation Engine',
|
||||
translationEngineOptions: {
|
||||
none: 'Off',
|
||||
opencc: 'OpenCC Traditionalize'
|
||||
},
|
||||
themeColor: {
|
||||
title: 'Lyric Theme Color',
|
||||
|
||||
@@ -10,6 +10,11 @@ export default {
|
||||
trackCount: '{count} tracks',
|
||||
playCount: 'Played {count} times'
|
||||
},
|
||||
tabs: {
|
||||
created: 'Created',
|
||||
favorite: 'Favorite',
|
||||
album: 'Album'
|
||||
},
|
||||
ranking: {
|
||||
title: 'Listening History',
|
||||
playCount: '{count} times'
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# 日本語翻訳 (Japanese Translation)
|
||||
|
||||
このディレクトリには、AlgerMusicPlayerの日本語翻訳ファイルが含まれています。
|
||||
|
||||
## ファイル構成
|
||||
|
||||
- `artist.ts` - アーティスト関連の翻訳
|
||||
- `common.ts` - 共通の翻訳(ボタン、メッセージなど)
|
||||
- `comp.ts` - コンポーネント関連の翻訳
|
||||
- `donation.ts` - 寄付関連の翻訳
|
||||
- `download.ts` - ダウンロード管理の翻訳
|
||||
- `favorite.ts` - お気に入り機能の翻訳
|
||||
- `history.ts` - 履歴機能の翻訳
|
||||
- `login.ts` - ログイン関連の翻訳
|
||||
- `player.ts` - プレイヤー機能の翻訳
|
||||
- `search.ts` - 検索機能の翻訳
|
||||
- `settings.ts` - 設定画面の翻訳
|
||||
- `songItem.ts` - 楽曲アイテムの翻訳
|
||||
- `user.ts` - ユーザー関連の翻訳
|
||||
- `index.ts` - すべての翻訳をエクスポートするメインファイル
|
||||
|
||||
## 使用方法
|
||||
|
||||
アプリケーション内で言語を日本語に切り替えるには:
|
||||
|
||||
1. 設定画面を開く
|
||||
2. 「言語設定」セクションを見つける
|
||||
3. ドロップダウンメニューから「日本語」を選択
|
||||
|
||||
## 翻訳の改善
|
||||
|
||||
翻訳の改善や修正がある場合は、該当するファイルを編集してプルリクエストを送信してください。
|
||||
|
||||
## 注意事項
|
||||
|
||||
- すべての翻訳キーは中国語版と英語版に対応しています
|
||||
- 新しい機能が追加された場合は、対応する日本語翻訳も追加する必要があります
|
||||
- 文字化けを避けるため、ファイルはUTF-8エンコーディングで保存してください
|
||||
@@ -2,4 +2,4 @@ export default {
|
||||
hotSongs: '人気楽曲',
|
||||
albums: 'アルバム',
|
||||
description: 'アーティスト紹介'
|
||||
};
|
||||
};
|
||||
|
||||
51
src/i18n/lang/ja-JP/bilibili.ts
Normal file
51
src/i18n/lang/ja-JP/bilibili.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export default {
|
||||
player: {
|
||||
loading: 'オーディオ読み込み中...',
|
||||
retry: '再試行',
|
||||
playNow: '今すぐ再生',
|
||||
loadingTitle: '読み込み中...',
|
||||
totalDuration: '総再生時間: {duration}',
|
||||
partsList: 'パートリスト ({count}話)',
|
||||
playStarted: '再生を開始しました',
|
||||
switchingPart: 'パートを切り替え中: {part}',
|
||||
preloadingNext: '次のパートをプリロード中: {part}',
|
||||
playingCurrent: '現在選択されたパートを再生中: {name}',
|
||||
num: '万',
|
||||
errors: {
|
||||
invalidVideoId: '無効な動画ID',
|
||||
loadVideoDetailFailed: '動画詳細の取得に失敗しました',
|
||||
loadPartInfoFailed: '動画パート情報の読み込みができません',
|
||||
loadAudioUrlFailed: 'オーディオ再生URLの取得に失敗しました',
|
||||
videoDetailNotLoaded: '動画詳細が読み込まれていません',
|
||||
missingParams: '必要なパラメータが不足しています',
|
||||
noAvailableAudioUrl: '利用可能なオーディオURLが見つかりません',
|
||||
loadPartAudioFailed: 'パートオーディオURLの読み込みに失敗しました',
|
||||
audioListEmpty: 'オーディオリストが空です。再試行してください',
|
||||
currentPartNotFound: '現在のパートのオーディオが見つかりません',
|
||||
audioUrlFailed: 'オーディオURLの取得に失敗しました',
|
||||
playFailed: '再生に失敗しました。再試行してください',
|
||||
getAudioUrlFailed: 'オーディオURLの取得に失敗しました。再試行してください',
|
||||
audioNotFound: '対応するオーディオが見つかりません。再試行してください',
|
||||
preloadFailed: '次のパートのプリロードに失敗しました',
|
||||
switchPartFailed: 'パート切り替え時のオーディオURL読み込みに失敗しました'
|
||||
},
|
||||
console: {
|
||||
loadingDetail: 'Bilibiliビデオ詳細を読み込み中',
|
||||
detailData: 'Bilibiliビデオ詳細データ',
|
||||
multipleParts: 'ビデオに複数のパートがあります。合計{count}個',
|
||||
noPartsData: 'ビデオにパートがないか、パートデータが空です',
|
||||
loadingAudioSource: 'オーディオソースを読み込み中',
|
||||
generatedAudioList: 'オーディオリストを生成しました。合計{count}個',
|
||||
getDashAudioUrl: 'dashオーディオURLを取得しました',
|
||||
getDurlAudioUrl: 'durlオーディオURLを取得しました',
|
||||
loadingPartAudio: 'パートオーディオURLを読み込み中: {part}, cid: {cid}',
|
||||
loadPartAudioFailed: 'パートオーディオURLの読み込みに失敗: {part}',
|
||||
switchToPart: 'パートに切り替え中: {part}',
|
||||
audioNotFoundInList: '対応するオーディオアイテムが見つかりません',
|
||||
preparingToPlay: '現在選択されたパートの再生準備中: {name}',
|
||||
preloadingNextPart: '次のパートをプリロード中: {part}',
|
||||
playingSelectedPart: '現在選択されたパートを再生中: {name}、オーディオURL: {url}',
|
||||
preloadNextFailed: '次のパートのプリロードに失敗しました'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -43,6 +43,8 @@ export default {
|
||||
collapse: '折りたたみ',
|
||||
songCount: '{count}曲',
|
||||
language: '言語',
|
||||
today: '今日',
|
||||
yesterday: '昨日',
|
||||
tray: {
|
||||
show: '表示',
|
||||
quit: '終了',
|
||||
@@ -53,4 +55,4 @@ export default {
|
||||
play: '再生',
|
||||
favorite: 'お気に入り'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,10 +38,12 @@ export default {
|
||||
nowUpdate: '今すぐ更新',
|
||||
downloadFailed: 'ダウンロードに失敗しました。再試行するか手動でダウンロードしてください',
|
||||
startFailed: 'ダウンロードの開始に失敗しました。再試行するか手動でダウンロードしてください',
|
||||
noDownloadUrl: '現在のシステムに適したインストールパッケージが見つかりません。手動でダウンロードしてください',
|
||||
noDownloadUrl:
|
||||
'現在のシステムに適したインストールパッケージが見つかりません。手動でダウンロードしてください',
|
||||
installConfirmTitle: '更新をインストール',
|
||||
installConfirmContent: 'アプリを閉じて更新をインストールしますか?',
|
||||
manualInstallTip: 'アプリを閉じた後にインストーラーが正常に起動しない場合は、ダウンロードフォルダでファイルを見つけて手動で開いてください。',
|
||||
manualInstallTip:
|
||||
'アプリを閉じた後にインストーラーが正常に起動しない場合は、ダウンロードフォルダでファイルを見つけて手動で開いてください。',
|
||||
yesInstall: '今すぐインストール',
|
||||
noThanks: '後でインストール',
|
||||
fileLocation: 'ファイルの場所',
|
||||
@@ -50,6 +52,31 @@ export default {
|
||||
copyFailed: 'コピーに失敗しました',
|
||||
backgroundDownload: 'バックグラウンドダウンロード'
|
||||
},
|
||||
disclaimer: {
|
||||
title: '使用上の注意',
|
||||
warning:
|
||||
'このアプリは開発テスト版であり、機能が不完全で、多くの問題やバグが存在する可能性があります。学習と交流のみを目的としています。',
|
||||
item1:
|
||||
'このアプリは個人の学習、研究、技術交流のみを目的としています。商業目的で使用しないでください。',
|
||||
item2:
|
||||
'ダウンロード後24時間以内に削除してください。長期使用を希望される場合は、正規の音楽サービスをサポートしてください。',
|
||||
item3:
|
||||
'このアプリを使用することで、関連するリスクを理解し、負担するものとします。開発者は一切の損失に対して責任を負いません。',
|
||||
agree: '以上の内容を読み、同意します',
|
||||
disagree: '同意せずに終了'
|
||||
},
|
||||
donate: {
|
||||
title: '開発者を支援',
|
||||
subtitle: '皆様のサポートが私の原動力です',
|
||||
tip: '寄付は完全に任意です。寄付しなくてもすべての機能を通常通り使用できます。ご理解とご支援に感謝します!',
|
||||
wechat: 'WeChat',
|
||||
alipay: 'Alipay',
|
||||
wechatQR: 'WeChat 受取コード',
|
||||
alipayQR: 'Alipay 受取コード',
|
||||
scanTip: 'スマートフォンのアプリで上記のQRコードをスキャンして寄付してください',
|
||||
enterApp: 'アプリに入る',
|
||||
noForce: '寄付は強制ではありません。クリックして入れます'
|
||||
},
|
||||
coffee: {
|
||||
title: 'コーヒーをおごる',
|
||||
alipay: 'Alipay',
|
||||
@@ -117,7 +144,11 @@ export default {
|
||||
cancelCollect: 'お気に入りから削除',
|
||||
addToPlaylist: 'プレイリストに追加',
|
||||
addToPlaylistSuccess: 'プレイリストに追加しました',
|
||||
songsAlreadyInPlaylist: '楽曲は既にプレイリストに存在します'
|
||||
songsAlreadyInPlaylist: '楽曲は既にプレイリストに存在します',
|
||||
historyRecommend: '履歴の日次推薦',
|
||||
fetchDatesFailed: '日付リストの取得に失敗しました',
|
||||
fetchSongsFailed: '楽曲リストの取得に失敗しました',
|
||||
noSongs: '楽曲がありません'
|
||||
},
|
||||
playlist: {
|
||||
import: {
|
||||
@@ -172,7 +203,8 @@ export default {
|
||||
noTasks: 'インポートタスクがありません',
|
||||
clearTasks: 'タスクをクリア',
|
||||
clearTasksConfirmTitle: 'クリア確認',
|
||||
clearTasksConfirmContent: 'すべてのインポートタスク記録をクリアしますか?この操作は元に戻せません。',
|
||||
clearTasksConfirmContent:
|
||||
'すべてのインポートタスク記録をクリアしますか?この操作は元に戻せません。',
|
||||
confirm: '確認',
|
||||
cancel: 'キャンセル',
|
||||
clearTasksSuccess: 'タスクリストをクリアしました',
|
||||
@@ -187,4 +219,4 @@ export default {
|
||||
mv: 'MV',
|
||||
home: 'ホーム',
|
||||
search: '検索'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
export default {
|
||||
description: 'あなたの寄付は開発・保守作業をサポートするために使用され、サーバー保守、ドメイン更新などが含まれます。',
|
||||
description:
|
||||
'あなたの寄付は開発・保守作業をサポートするために使用され、サーバー保守、ドメイン更新などが含まれます。',
|
||||
message: 'メッセージを残す際は、メールアドレスやGitHubユーザー名を記載してください。',
|
||||
refresh: 'リストを更新',
|
||||
toDonateList: 'コーヒーをおごる',
|
||||
noMessage: 'メッセージがありません',
|
||||
title: '寄付リスト'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -36,7 +36,8 @@ export default {
|
||||
},
|
||||
clear: {
|
||||
title: 'ダウンロード記録をクリア',
|
||||
message: 'すべてのダウンロード記録をクリアしますか?この操作はダウンロード済みの音楽ファイルを削除しませんが、すべての記録をクリアします。',
|
||||
message:
|
||||
'すべてのダウンロード記録をクリアしますか?この操作はダウンロード済みの音楽ファイルを削除しませんが、すべての記録をクリアします。',
|
||||
confirm: 'クリア確認',
|
||||
cancel: 'キャンセル',
|
||||
success: 'ダウンロード記録をクリアしました'
|
||||
@@ -84,4 +85,4 @@ export default {
|
||||
albumName: 'アルバム名'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,4 +10,4 @@ export default {
|
||||
selectSongsFirst: 'まずダウンロードする楽曲を選択してください',
|
||||
descending: '降順',
|
||||
ascending: '昇順'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
export default {
|
||||
title: '再生履歴',
|
||||
heatmapTitle: 'ヒートマップ',
|
||||
playCount: '{count}',
|
||||
getHistoryFailed: '履歴の取得に失敗しました'
|
||||
};
|
||||
getHistoryFailed: '履歴の取得に失敗しました',
|
||||
tabs: {
|
||||
all: 'すべての記録',
|
||||
local: 'ローカル記録',
|
||||
cloud: 'クラウド記録'
|
||||
},
|
||||
categoryTabs: {
|
||||
songs: '楽曲',
|
||||
playlists: 'プレイリスト',
|
||||
albums: 'アルバム'
|
||||
},
|
||||
noDescription: '説明なし',
|
||||
noData: '記録なし',
|
||||
getCloudRecordFailed: 'クラウド記録の取得に失敗しました',
|
||||
needLogin: 'cookieを使用してログインしてクラウド記録を表示できます',
|
||||
merging: '記録を統合中...',
|
||||
heatmap: {
|
||||
title: '再生ヒートマップ',
|
||||
loading: 'データを読み込み中...',
|
||||
unit: '回再生',
|
||||
footerText: 'ホバーして詳細を表示',
|
||||
playCount: '{count} 回再生',
|
||||
topSongs: 'その日の人気曲',
|
||||
times: '回',
|
||||
totalPlays: '総再生回数',
|
||||
activeDays: 'アクティブ日数',
|
||||
noData: '再生記録がありません',
|
||||
colorTheme: 'カラーテーマ',
|
||||
colors: {
|
||||
green: 'グリーン',
|
||||
blue: 'ブルー',
|
||||
orange: 'オレンジ',
|
||||
purple: 'パープル',
|
||||
red: 'レッド'
|
||||
},
|
||||
mostPlayedSong: '最も再生された曲',
|
||||
mostActiveDay: '最もアクティブな日',
|
||||
latestNightSong: '深夜に再生した曲'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,8 +41,25 @@ export default {
|
||||
uidLoginFailed: 'UIDログインに失敗しました。ユーザーIDが正しいか確認してください',
|
||||
autoGetCookieSuccess: 'Cookie自動取得成功',
|
||||
autoGetCookieFailed: 'Cookie自動取得失敗',
|
||||
autoGetCookieTip: 'NetEase Cloud Musicのログインページを開きます。ログイン完了後、ウィンドウを閉じてください'
|
||||
autoGetCookieTip:
|
||||
'NetEase Cloud Musicのログインページを開きます。ログイン完了後、ウィンドウを閉じてください',
|
||||
loginFailed: 'ログイン失敗',
|
||||
phoneRequired: '電話番号を入力してください',
|
||||
passwordRequired: 'パスワードを入力してください',
|
||||
phoneLoginFailed:
|
||||
'電話番号でのログインに失敗しました。電話番号とパスワードが正しいか確認してください',
|
||||
qrCheckFailed: 'QRコードの状態確認に失敗しました。リフレッシュして再試行してください',
|
||||
qrLoading: 'QRコードを読み込み中...',
|
||||
qrExpired: 'QRコードの期限が切れました。クリックしてリフレッシュしてください',
|
||||
qrExpiredShort: 'QRコード期限切れ',
|
||||
qrExpiredWarning: 'QRコードの期限が切れました。クリックして新しいQRコードを取得してください',
|
||||
qrScanned: 'QRコードがスキャンされました。スマートフォンでログインを確認してください',
|
||||
qrScannedShort: 'スキャン済み',
|
||||
qrScannedInfo: 'QRコードがスキャンされました。スマートフォンでログインを確認してください',
|
||||
qrConfirmed: 'ログイン成功、リダイレクト中...',
|
||||
qrGenerating: 'QRコードを生成中...'
|
||||
},
|
||||
qrTitle: 'NetEase Cloud Music QRコードログイン',
|
||||
uidWarning: '注意:UIDログインはユーザーの公開情報を表示するためのみ使用でき、ログイン権限が必要な機能にはアクセスできません。'
|
||||
};
|
||||
uidWarning:
|
||||
'注意:UIDログインはユーザーの公開情報を表示するためのみ使用でき、ログイン権限が必要な機能にはアクセスできません。'
|
||||
};
|
||||
|
||||
@@ -1,123 +1,145 @@
|
||||
export default {
|
||||
nowPlaying: '再生中',
|
||||
playlist: 'プレイリスト',
|
||||
lyrics: '歌詞',
|
||||
previous: '前へ',
|
||||
play: '再生',
|
||||
pause: '一時停止',
|
||||
next: '次へ',
|
||||
volumeUp: '音量を上げる',
|
||||
volumeDown: '音量を下げる',
|
||||
mute: 'ミュート',
|
||||
unmute: 'ミュート解除',
|
||||
songNum: '楽曲総数:{num}',
|
||||
addCorrection: '{num}秒早める',
|
||||
subtractCorrection: '{num}秒遅らせる',
|
||||
playFailed: '現在の楽曲の再生に失敗しました。次の曲を再生します',
|
||||
playMode: {
|
||||
sequence: '順次再生',
|
||||
loop: 'リピート再生',
|
||||
random: 'ランダム再生'
|
||||
},
|
||||
fullscreen: {
|
||||
enter: 'フルスクリーン',
|
||||
exit: 'フルスクリーン終了'
|
||||
},
|
||||
close: '閉じる',
|
||||
modeHint: {
|
||||
single: 'リピート再生',
|
||||
list: '自動で次の曲を再生'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '歌詞がありません。お楽しみください'
|
||||
},
|
||||
reparse: {
|
||||
title: '解析音源を選択',
|
||||
desc: '音源をクリックして直接解析します。次回この楽曲を再生する際は選択した音源を使用します',
|
||||
success: '再解析成功',
|
||||
failed: '再解析失敗',
|
||||
warning: '音源を選択してください',
|
||||
bilibiliNotSupported: 'Bilibili動画は再解析をサポートしていません',
|
||||
processing: '解析中...',
|
||||
clear: 'カスタム音源をクリア'
|
||||
},
|
||||
playBar: {
|
||||
expand: '歌詞を展開',
|
||||
collapse: '歌詞を折りたたみ',
|
||||
like: 'いいね',
|
||||
lyric: '歌詞',
|
||||
noSongPlaying: '再生中の楽曲がありません',
|
||||
eq: 'イコライザー',
|
||||
playList: 'プレイリスト',
|
||||
reparse: '再解析',
|
||||
playMode: {
|
||||
sequence: '順次再生',
|
||||
loop: 'ループ再生',
|
||||
random: 'ランダム再生'
|
||||
},
|
||||
play: '再生開始',
|
||||
pause: '再生一時停止',
|
||||
prev: '前の曲',
|
||||
next: '次の曲',
|
||||
volume: '音量',
|
||||
favorite: '{name}をお気に入りに追加しました',
|
||||
unFavorite: '{name}をお気に入りから削除しました',
|
||||
miniPlayBar: 'ミニ再生バー',
|
||||
playbackSpeed: '再生速度',
|
||||
advancedControls: 'その他の設定'
|
||||
},
|
||||
eq: {
|
||||
title: 'イコライザー',
|
||||
reset: 'リセット',
|
||||
on: 'オン',
|
||||
off: 'オフ',
|
||||
bass: '低音',
|
||||
midrange: '中音',
|
||||
treble: '高音',
|
||||
presets: {
|
||||
flat: 'フラット',
|
||||
pop: 'ポップ',
|
||||
rock: 'ロック',
|
||||
classical: 'クラシック',
|
||||
jazz: 'ジャズ',
|
||||
electronic: 'エレクトロニック',
|
||||
hiphop: 'ヒップホップ',
|
||||
rb: 'R&B',
|
||||
metal: 'メタル',
|
||||
vocal: 'ボーカル',
|
||||
dance: 'ダンス',
|
||||
acoustic: 'アコースティック',
|
||||
custom: 'カスタム'
|
||||
}
|
||||
},
|
||||
// タイマー機能関連
|
||||
sleepTimer: {
|
||||
title: 'スリープタイマー',
|
||||
cancel: 'タイマーをキャンセル',
|
||||
timeMode: '時間で停止',
|
||||
songsMode: '楽曲数で停止',
|
||||
playlistEnd: 'プレイリスト終了後に停止',
|
||||
afterPlaylist: 'プレイリスト終了後に停止',
|
||||
activeUntilEnd: 'リスト終了まで再生',
|
||||
minutes: '分',
|
||||
hours: '時間',
|
||||
songs: '曲',
|
||||
set: '設定',
|
||||
timerSetSuccess: '{minutes}分後に停止するよう設定しました',
|
||||
songsSetSuccess: '{songs}曲再生後に停止するよう設定しました',
|
||||
playlistEndSetSuccess: 'プレイリスト終了後に停止するよう設定しました',
|
||||
timerCancelled: 'スリープタイマーをキャンセルしました',
|
||||
timerEnded: 'スリープタイマーが作動しました',
|
||||
playbackStopped: '音楽再生を停止しました',
|
||||
minutesRemaining: '残り{minutes}分',
|
||||
songsRemaining: '残り{count}曲'
|
||||
},
|
||||
playList: {
|
||||
clearAll: 'プレイリストをクリア',
|
||||
alreadyEmpty: 'プレイリストは既に空です',
|
||||
cleared: 'プレイリストをクリアしました',
|
||||
empty: 'プレイリストが空です',
|
||||
clearConfirmTitle: 'プレイリストをクリア',
|
||||
clearConfirmContent: 'これによりプレイリスト内のすべての楽曲がクリアされ、現在の再生が停止されます。続行しますか?'
|
||||
}
|
||||
};
|
||||
export default {
|
||||
nowPlaying: '再生中',
|
||||
playlist: 'プレイリスト',
|
||||
lyrics: '歌詞',
|
||||
previous: '前へ',
|
||||
play: '再生',
|
||||
pause: '一時停止',
|
||||
next: '次へ',
|
||||
volumeUp: '音量を上げる',
|
||||
volumeDown: '音量を下げる',
|
||||
mute: 'ミュート',
|
||||
unmute: 'ミュート解除',
|
||||
songNum: '楽曲総数:{num}',
|
||||
addCorrection: '{num}秒早める',
|
||||
subtractCorrection: '{num}秒遅らせる',
|
||||
playFailed: '現在の楽曲の再生に失敗しました。次の曲を再生します',
|
||||
parseFailedPlayNext: '楽曲の解析に失敗しました。次の曲を再生します',
|
||||
consecutiveFailsError:
|
||||
'再生エラーが発生しました。ネットワークの問題または無効な音源の可能性があります。プレイリストを切り替えるか、後でもう一度お試しください',
|
||||
playMode: {
|
||||
sequence: '順次再生',
|
||||
loop: 'リピート再生',
|
||||
random: 'ランダム再生'
|
||||
},
|
||||
fullscreen: {
|
||||
enter: 'フルスクリーン',
|
||||
exit: 'フルスクリーン終了'
|
||||
},
|
||||
close: '閉じる',
|
||||
modeHint: {
|
||||
single: 'リピート再生',
|
||||
list: '自動で次の曲を再生'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '歌詞がありません。お楽しみください',
|
||||
noAutoScroll: '本歌詞は自動スクロールをサポートしていません'
|
||||
},
|
||||
reparse: {
|
||||
title: '解析音源を選択',
|
||||
desc: '音源をクリックして直接解析します。次回この楽曲を再生する際は選択した音源を使用します',
|
||||
success: '再解析成功',
|
||||
failed: '再解析失敗',
|
||||
warning: '音源を選択してください',
|
||||
bilibiliNotSupported: 'Bilibili動画は再解析をサポートしていません',
|
||||
processing: '解析中...',
|
||||
clear: 'カスタム音源をクリア',
|
||||
customApiFailed: 'カスタムAPIの解析に失敗しました。内蔵音源を試しています...',
|
||||
customApiError: 'カスタムAPIのリクエストでエラーが発生しました。内蔵音源を試しています...'
|
||||
},
|
||||
playBar: {
|
||||
expand: '歌詞を展開',
|
||||
collapse: '歌詞を折りたたみ',
|
||||
like: 'いいね',
|
||||
lyric: '歌詞',
|
||||
noSongPlaying: '再生中の楽曲がありません',
|
||||
eq: 'イコライザー',
|
||||
playList: 'プレイリスト',
|
||||
reparse: '再解析',
|
||||
playMode: {
|
||||
sequence: '順次再生',
|
||||
loop: 'ループ再生',
|
||||
random: 'ランダム再生'
|
||||
},
|
||||
play: '再生開始',
|
||||
pause: '再生一時停止',
|
||||
prev: '前の曲',
|
||||
next: '次の曲',
|
||||
volume: '音量',
|
||||
favorite: '{name}をお気に入りに追加しました',
|
||||
unFavorite: '{name}をお気に入りから削除しました',
|
||||
miniPlayBar: 'ミニ再生バー',
|
||||
playbackSpeed: '再生速度',
|
||||
advancedControls: 'その他の設定',
|
||||
intelligenceMode: {
|
||||
title: 'インテリジェンスモード',
|
||||
needCookieLogin: 'Cookie方式でログインしてからインテリジェンスモードを使用してください',
|
||||
noFavoritePlaylist: '「お気に入りの音楽」プレイリストが見つかりません',
|
||||
noLikedSongs: 'まだ「いいね」した楽曲がありません',
|
||||
loading: 'インテリジェンスモードを読み込み中',
|
||||
success: '{count} 曲を読み込みました',
|
||||
failed: 'インテリジェンスモードのリスト取得に失敗しました',
|
||||
error: 'インテリジェンスモードの再生でエラーが発生しました'
|
||||
}
|
||||
},
|
||||
eq: {
|
||||
title: 'イコライザー',
|
||||
reset: 'リセット',
|
||||
on: 'オン',
|
||||
off: 'オフ',
|
||||
bass: '低音',
|
||||
midrange: '中音',
|
||||
treble: '高音',
|
||||
presets: {
|
||||
flat: 'フラット',
|
||||
pop: 'ポップ',
|
||||
rock: 'ロック',
|
||||
classical: 'クラシック',
|
||||
jazz: 'ジャズ',
|
||||
electronic: 'エレクトロニック',
|
||||
hiphop: 'ヒップホップ',
|
||||
rb: 'R&B',
|
||||
metal: 'メタル',
|
||||
vocal: 'ボーカル',
|
||||
dance: 'ダンス',
|
||||
acoustic: 'アコースティック',
|
||||
custom: 'カスタム'
|
||||
}
|
||||
},
|
||||
// プレイヤー設定
|
||||
settings: {
|
||||
title: '再生設定',
|
||||
playbackSpeed: '再生速度'
|
||||
},
|
||||
// タイマー機能関連
|
||||
sleepTimer: {
|
||||
title: 'スリープタイマー',
|
||||
cancel: 'タイマーをキャンセル',
|
||||
timeMode: '時間で停止',
|
||||
songsMode: '楽曲数で停止',
|
||||
playlistEnd: 'プレイリスト終了後に停止',
|
||||
afterPlaylist: 'プレイリスト終了後に停止',
|
||||
activeUntilEnd: 'リスト終了まで再生',
|
||||
minutes: '分',
|
||||
hours: '時間',
|
||||
songs: '曲',
|
||||
set: '設定',
|
||||
timerSetSuccess: '{minutes}分後に停止するよう設定しました',
|
||||
songsSetSuccess: '{songs}曲再生後に停止するよう設定しました',
|
||||
playlistEndSetSuccess: 'プレイリスト終了後に停止するよう設定しました',
|
||||
timerCancelled: 'スリープタイマーをキャンセルしました',
|
||||
timerEnded: 'スリープタイマーが作動しました',
|
||||
playbackStopped: '音楽再生を停止しました',
|
||||
minutesRemaining: '残り{minutes}分',
|
||||
songsRemaining: '残り{count}曲'
|
||||
},
|
||||
playList: {
|
||||
clearAll: 'プレイリストをクリア',
|
||||
alreadyEmpty: 'プレイリストは既に空です',
|
||||
cleared: 'プレイリストをクリアしました',
|
||||
empty: 'プレイリストが空です',
|
||||
clearConfirmTitle: 'プレイリストをクリア',
|
||||
clearConfirmContent:
|
||||
'これによりプレイリスト内のすべての楽曲がクリアされ、現在の再生が停止されます。続行しますか?'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,8 @@ export default {
|
||||
},
|
||||
loading: {
|
||||
more: '読み込み中...',
|
||||
failed: '検索に失敗しました'
|
||||
failed: '検索に失敗しました',
|
||||
searching: '検索中...'
|
||||
},
|
||||
noMore: 'これ以上ありません',
|
||||
error: {
|
||||
@@ -23,5 +24,8 @@ export default {
|
||||
playlist: 'プレイリスト',
|
||||
mv: 'MV',
|
||||
bilibili: 'Bilibili'
|
||||
}
|
||||
};
|
||||
},
|
||||
history: '検索履歴',
|
||||
hot: '人気検索',
|
||||
suggestions: '検索候補'
|
||||
};
|
||||
|
||||
@@ -1,322 +1,441 @@
|
||||
export default {
|
||||
theme: 'テーマ',
|
||||
language: '言語',
|
||||
regard: 'について',
|
||||
logout: 'ログアウト',
|
||||
sections: {
|
||||
basic: '基本設定',
|
||||
playback: '再生設定',
|
||||
application: 'アプリケーション設定',
|
||||
network: 'ネットワーク設定',
|
||||
system: 'システム管理',
|
||||
donation: '寄付サポート',
|
||||
regard: 'について'
|
||||
},
|
||||
basic: {
|
||||
themeMode: 'テーマモード',
|
||||
themeModeDesc: 'ライト/ダークテーマの切り替え',
|
||||
autoTheme: 'システムに従う',
|
||||
manualTheme: '手動切り替え',
|
||||
language: '言語設定',
|
||||
languageDesc: '表示言語を切り替え',
|
||||
tokenManagement: 'Cookie管理',
|
||||
tokenManagementDesc: 'NetEase Cloud MusicログインCookieを管理',
|
||||
tokenStatus: '現在のCookieステータス',
|
||||
tokenSet: '設定済み',
|
||||
tokenNotSet: '未設定',
|
||||
setToken: 'Cookieを設定',
|
||||
modifyToken: 'Cookieを変更',
|
||||
clearToken: 'Cookieをクリア',
|
||||
font: 'フォント設定',
|
||||
fontDesc: 'フォントを選択します。前に配置されたフォントが優先されます',
|
||||
fontScope: {
|
||||
global: 'グローバル',
|
||||
lyric: '歌詞のみ'
|
||||
},
|
||||
animation: 'アニメーション速度',
|
||||
animationDesc: 'アニメーションを有効にするかどうか',
|
||||
animationSpeed: {
|
||||
slow: '非常に遅い',
|
||||
normal: '通常',
|
||||
fast: '非常に速い'
|
||||
},
|
||||
fontPreview: {
|
||||
title: 'フォントプレビュー',
|
||||
chinese: '中国語',
|
||||
english: 'English',
|
||||
japanese: '日本語',
|
||||
korean: '韓国語',
|
||||
chineseText: '静夜思 床前明月光 疑是地上霜',
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
}
|
||||
},
|
||||
playback: {
|
||||
quality: '音質設定',
|
||||
qualityDesc: '音楽再生の音質を選択(NetEase Cloud VIP)',
|
||||
qualityOptions: {
|
||||
standard: '標準',
|
||||
higher: '高音質',
|
||||
exhigh: '超高音質',
|
||||
lossless: 'ロスレス',
|
||||
hires: 'Hi-Res',
|
||||
jyeffect: 'HD サラウンド',
|
||||
sky: 'イマーシブサラウンド',
|
||||
dolby: 'Dolby Atmos',
|
||||
jymaster: '超高解像度マスター'
|
||||
},
|
||||
musicSources: '音源設定',
|
||||
musicSourcesDesc: '音楽解析に使用する音源プラットフォームを選択',
|
||||
musicSourcesWarning: '少なくとも1つの音源プラットフォームを選択する必要があります',
|
||||
musicUnblockEnable: '音楽解析を有効にする',
|
||||
musicUnblockEnableDesc: '有効にすると、再生できない音楽の解析を試みます',
|
||||
configureMusicSources: '音源を設定',
|
||||
selectedMusicSources: '選択された音源:',
|
||||
noMusicSources: '音源が選択されていません',
|
||||
gdmusicInfo: 'GD音楽台は複数のプラットフォーム音源を自動解析し、最適な結果を自動選択できます',
|
||||
autoPlay: '自動再生',
|
||||
autoPlayDesc: 'アプリを再起動した際に自動的に再生を継続するかどうか',
|
||||
showStatusBar: 'ステータスバーコントロール機能を表示するかどうか',
|
||||
showStatusBarContent: 'Macのステータスバーに音楽コントロール機能を表示できます(再起動後に有効)'
|
||||
},
|
||||
application: {
|
||||
closeAction: '閉じる動作',
|
||||
closeActionDesc: 'ウィンドウを閉じる際の動作を選択',
|
||||
closeOptions: {
|
||||
ask: '毎回確認',
|
||||
minimize: 'トレイに最小化',
|
||||
close: '直接終了'
|
||||
},
|
||||
shortcut: 'ショートカット設定',
|
||||
shortcutDesc: 'グローバルショートカットをカスタマイズ',
|
||||
download: 'ダウンロード管理',
|
||||
downloadDesc: 'ダウンロードリストボタンを常に表示するかどうか',
|
||||
unlimitedDownload: '無制限ダウンロード',
|
||||
unlimitedDownloadDesc: '有効にすると音楽を無制限でダウンロードします(ダウンロード失敗の可能性があります)。デフォルトは300曲制限',
|
||||
downloadPath: 'ダウンロードディレクトリ',
|
||||
downloadPathDesc: '音楽ファイルのダウンロード場所を選択',
|
||||
remoteControl: 'リモートコントロール',
|
||||
remoteControlDesc: 'リモートコントロール機能を設定'
|
||||
},
|
||||
network: {
|
||||
apiPort: '音楽APIポート',
|
||||
apiPortDesc: '変更後はアプリの再起動が必要です',
|
||||
proxy: 'プロキシ設定',
|
||||
proxyDesc: '音楽にアクセスできない場合はプロキシを有効にできます',
|
||||
proxyHost: 'プロキシアドレス',
|
||||
proxyHostPlaceholder: 'プロキシアドレスを入力してください',
|
||||
proxyPort: 'プロキシポート',
|
||||
proxyPortPlaceholder: 'プロキシポートを入力してください',
|
||||
realIP: 'realIP設定',
|
||||
realIPDesc: '制限により、このプロジェクトは海外での使用が制限されます。realIPパラメータを使用して国内IPを渡すことで解決できます',
|
||||
messages: {
|
||||
proxySuccess: 'プロキシ設定を保存しました。アプリ再起動後に有効になります',
|
||||
proxyError: '入力が正しいかどうか確認してください',
|
||||
realIPSuccess: '実IPアドレス設定を保存しました',
|
||||
realIPError: '有効なIPアドレスを入力してください'
|
||||
}
|
||||
},
|
||||
system: {
|
||||
cache: 'キャッシュ管理',
|
||||
cacheDesc: 'キャッシュをクリア',
|
||||
cacheClearTitle: 'クリアするキャッシュタイプを選択してください:',
|
||||
cacheTypes: {
|
||||
history: {
|
||||
label: '再生履歴',
|
||||
description: '再生した楽曲の記録をクリア'
|
||||
},
|
||||
favorite: {
|
||||
label: 'お気に入り記録',
|
||||
description: 'ローカルのお気に入り楽曲記録をクリア(クラウドのお気に入りには影響しません)'
|
||||
},
|
||||
user: {
|
||||
label: 'ユーザーデータ',
|
||||
description: 'ログイン情報とユーザー関連データをクリア'
|
||||
},
|
||||
settings: {
|
||||
label: 'アプリ設定',
|
||||
description: 'アプリのすべてのカスタム設定をクリア'
|
||||
},
|
||||
downloads: {
|
||||
label: 'ダウンロード記録',
|
||||
description: 'ダウンロード履歴をクリア(ダウンロード済みファイルは削除されません)'
|
||||
},
|
||||
resources: {
|
||||
label: '音楽リソース',
|
||||
description: '読み込み済みの音楽ファイル、歌詞などのリソースキャッシュをクリア'
|
||||
},
|
||||
lyrics: {
|
||||
label: '歌詞リソース',
|
||||
description: '読み込み済みの歌詞リソースキャッシュをクリア'
|
||||
}
|
||||
},
|
||||
restart: '再起動',
|
||||
restartDesc: 'アプリを再起動',
|
||||
messages: {
|
||||
clearSuccess: 'クリア成功。一部の設定は再起動後に有効になります'
|
||||
}
|
||||
},
|
||||
about: {
|
||||
version: 'バージョン',
|
||||
checkUpdate: '更新を確認',
|
||||
checking: '確認中...',
|
||||
latest: '現在最新バージョンです',
|
||||
hasUpdate: '新しいバージョンが見つかりました',
|
||||
gotoUpdate: '更新へ',
|
||||
gotoGithub: 'Githubへ',
|
||||
author: '作者',
|
||||
authorDesc: 'algerkong スターを付けてください🌟',
|
||||
messages: {
|
||||
checkError: '更新確認に失敗しました。後でもう一度お試しください'
|
||||
}
|
||||
},
|
||||
validation: {
|
||||
selectProxyProtocol: 'プロキシプロトコルを選択してください',
|
||||
proxyHost: 'プロキシアドレスを入力してください',
|
||||
portNumber: '有効なポート番号を入力してください(1-65535)'
|
||||
},
|
||||
lyricSettings: {
|
||||
title: '歌詞設定',
|
||||
tabs: {
|
||||
display: '表示',
|
||||
interface: 'インターフェース',
|
||||
typography: 'テキスト',
|
||||
mobile: 'モバイル'
|
||||
},
|
||||
pureMode: 'ピュアモード',
|
||||
hideCover: 'カバーを非表示',
|
||||
centerDisplay: '中央表示',
|
||||
showTranslation: '翻訳を表示',
|
||||
hideLyrics: '歌詞を非表示',
|
||||
hidePlayBar: '再生バーを非表示',
|
||||
hideMiniPlayBar: 'ミニ再生バーを非表示',
|
||||
showMiniPlayBar: 'ミニ再生バーを表示',
|
||||
backgroundTheme: '背景テーマ',
|
||||
themeOptions: {
|
||||
default: 'デフォルト',
|
||||
light: 'ライト',
|
||||
dark: 'ダーク'
|
||||
},
|
||||
fontSize: 'フォントサイズ',
|
||||
fontSizeMarks: {
|
||||
small: '小',
|
||||
medium: '中',
|
||||
large: '大'
|
||||
},
|
||||
letterSpacing: '文字間隔',
|
||||
letterSpacingMarks: {
|
||||
compact: 'コンパクト',
|
||||
default: 'デフォルト',
|
||||
loose: 'ゆったり'
|
||||
},
|
||||
lineHeight: '行の高さ',
|
||||
lineHeightMarks: {
|
||||
compact: 'コンパクト',
|
||||
default: 'デフォルト',
|
||||
loose: 'ゆったり'
|
||||
},
|
||||
mobileLayout: 'モバイルレイアウト',
|
||||
layoutOptions: {
|
||||
default: 'デフォルト',
|
||||
ios: 'iOSスタイル',
|
||||
android: 'Androidスタイル'
|
||||
},
|
||||
mobileCoverStyle: 'カバースタイル',
|
||||
coverOptions: {
|
||||
record: 'レコード',
|
||||
square: '正方形',
|
||||
full: 'フルスクリーン'
|
||||
},
|
||||
lyricLines: '歌詞行数',
|
||||
mobileUnavailable: 'この設定はモバイルでのみ利用可能です'
|
||||
},
|
||||
themeColor: {
|
||||
title: '歌詞テーマカラー',
|
||||
presetColors: 'プリセットカラー',
|
||||
customColor: 'カスタムカラー',
|
||||
preview: 'プレビュー効果',
|
||||
previewText: '歌詞効果',
|
||||
colorNames: {
|
||||
'spotify-green': 'Spotify グリーン',
|
||||
'apple-blue': 'Apple ブルー',
|
||||
'youtube-red': 'YouTube レッド',
|
||||
orange: 'バイタルオレンジ',
|
||||
purple: 'ミステリアスパープル',
|
||||
pink: 'サクラピンク'
|
||||
},
|
||||
tooltips: {
|
||||
openColorPicker: 'カラーパレットを開く',
|
||||
closeColorPicker: 'カラーパレットを閉じる'
|
||||
},
|
||||
placeholder: '#1db954'
|
||||
},
|
||||
shortcutSettings: {
|
||||
title: 'ショートカット設定',
|
||||
shortcut: 'ショートカット',
|
||||
shortcutDesc: 'ショートカットをカスタマイズ',
|
||||
shortcutConflict: 'ショートカットの競合',
|
||||
inputPlaceholder: 'クリックしてショートカットを入力',
|
||||
resetShortcuts: 'デフォルトに戻す',
|
||||
disableAll: 'すべて無効',
|
||||
enableAll: 'すべて有効',
|
||||
togglePlay: '再生/一時停止',
|
||||
prevPlay: '前の曲',
|
||||
nextPlay: '次の曲',
|
||||
volumeUp: '音量を上げる',
|
||||
volumeDown: '音量を下げる',
|
||||
toggleFavorite: 'お気に入り/お気に入り解除',
|
||||
toggleWindow: 'ウィンドウ表示/非表示',
|
||||
scopeGlobal: 'グローバル',
|
||||
scopeApp: 'アプリ内',
|
||||
enabled: '有効',
|
||||
disabled: '無効',
|
||||
messages: {
|
||||
resetSuccess: 'デフォルトのショートカットに戻しました。保存を忘れずに',
|
||||
conflict: '競合するショートカットがあります。再設定してください',
|
||||
saveSuccess: 'ショートカット設定を保存しました',
|
||||
saveError: 'ショートカットの保存に失敗しました。再試行してください',
|
||||
cancelEdit: '変更をキャンセルしました',
|
||||
disableAll: 'すべてのショートカットを無効にしました。保存を忘れずに',
|
||||
enableAll: 'すべてのショートカットを有効にしました。保存を忘れずに'
|
||||
}
|
||||
},
|
||||
remoteControl: {
|
||||
title: 'リモートコントロール',
|
||||
enable: 'リモートコントロールを有効にする',
|
||||
port: 'サービスポート',
|
||||
allowedIps: '許可されたIPアドレス',
|
||||
addIp: 'IPを追加',
|
||||
emptyListHint: '空のリストはすべてのIPアクセスを許可することを意味します',
|
||||
saveSuccess: 'リモートコントロール設定を保存しました',
|
||||
accessInfo: 'リモートコントロールアクセスアドレス:'
|
||||
},
|
||||
cookie: {
|
||||
title: 'Cookie設定',
|
||||
description: 'NetEase Cloud MusicのCookieを入力してください:',
|
||||
placeholder: '完全なCookieを貼り付けてください...',
|
||||
help: {
|
||||
format: 'Cookieは通常「MUSIC_U=」で始まります',
|
||||
source: 'ブラウザの開発者ツールのネットワークリクエストから取得できます',
|
||||
storage: 'Cookie設定後、自動的にローカルストレージに保存されます'
|
||||
},
|
||||
action: {
|
||||
save: 'Cookieを保存',
|
||||
paste: '貼り付け',
|
||||
clear: 'クリア'
|
||||
},
|
||||
validation: {
|
||||
required: 'Cookieを入力してください',
|
||||
format: 'Cookie形式が正しくない可能性があります。MUSIC_Uが含まれているか確認してください'
|
||||
},
|
||||
message: {
|
||||
saveSuccess: 'Cookieの保存に成功しました',
|
||||
saveError: 'Cookieの保存に失敗しました',
|
||||
pasteSuccess: '貼り付けに成功しました',
|
||||
pasteError: '貼り付けに失敗しました。手動でコピーしてください'
|
||||
},
|
||||
info: {
|
||||
length: '現在の長さ:{length} 文字'
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
theme: 'テーマ',
|
||||
language: '言語',
|
||||
regard: 'について',
|
||||
logout: 'ログアウト',
|
||||
sections: {
|
||||
basic: '基本設定',
|
||||
playback: '再生設定',
|
||||
application: 'アプリケーション設定',
|
||||
network: 'ネットワーク設定',
|
||||
system: 'システム管理',
|
||||
donation: '寄付サポート',
|
||||
about: 'について'
|
||||
},
|
||||
basic: {
|
||||
themeMode: 'テーマモード',
|
||||
themeModeDesc: 'ライト/ダークテーマの切り替え',
|
||||
autoTheme: 'システムに従う',
|
||||
manualTheme: '手動切り替え',
|
||||
language: '言語設定',
|
||||
languageDesc: '表示言語を切り替え',
|
||||
tokenManagement: 'Cookie管理',
|
||||
tokenManagementDesc: 'NetEase Cloud MusicログインCookieを管理',
|
||||
tokenStatus: '現在のCookieステータス',
|
||||
tokenSet: '設定済み',
|
||||
tokenNotSet: '未設定',
|
||||
setToken: 'Cookieを設定',
|
||||
modifyToken: 'Cookieを変更',
|
||||
clearToken: 'Cookieをクリア',
|
||||
font: 'フォント設定',
|
||||
fontDesc: 'フォントを選択します。前に配置されたフォントが優先されます',
|
||||
fontScope: {
|
||||
global: 'グローバル',
|
||||
lyric: '歌詞のみ'
|
||||
},
|
||||
animation: 'アニメーション速度',
|
||||
animationDesc: 'アニメーションを有効にするかどうか',
|
||||
animationSpeed: {
|
||||
slow: '非常に遅い',
|
||||
normal: '通常',
|
||||
fast: '非常に速い'
|
||||
},
|
||||
fontPreview: {
|
||||
title: 'フォントプレビュー',
|
||||
chinese: '中国語',
|
||||
english: 'English',
|
||||
japanese: '日本語',
|
||||
korean: '韓国語',
|
||||
chineseText: '静夜思 床前明月光 疑是地上霜',
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
},
|
||||
gpuAcceleration: 'GPUアクセラレーション',
|
||||
gpuAccelerationDesc:
|
||||
'ハードウェアアクセラレーションを有効または無効にします。レンダリングパフォーマンスを向上させますが、GPU負荷が増える可能性があります',
|
||||
gpuAccelerationRestart: 'GPUアクセラレーション設定の変更はアプリの再起動後に有効になります',
|
||||
gpuAccelerationChangeSuccess:
|
||||
'GPUアクセラレーション設定を更新しました。アプリの再起動後に有効になります',
|
||||
gpuAccelerationChangeError: 'GPUアクセラレーション設定の更新に失敗しました',
|
||||
tabletMode: 'タブレットモード',
|
||||
tabletModeDesc:
|
||||
'タブレットモードを有効にすると、モバイルデバイスでPCスタイルのインターフェースを使用できます'
|
||||
},
|
||||
playback: {
|
||||
quality: '音質設定',
|
||||
qualityDesc: '音楽再生の音質を選択(NetEase Cloud VIP)',
|
||||
qualityOptions: {
|
||||
standard: '標準',
|
||||
higher: '高音質',
|
||||
exhigh: '超高音質',
|
||||
lossless: 'ロスレス',
|
||||
hires: 'Hi-Res',
|
||||
jyeffect: 'HD サラウンド',
|
||||
sky: 'イマーシブサラウンド',
|
||||
dolby: 'Dolby Atmos',
|
||||
jymaster: '超高解像度マスター'
|
||||
},
|
||||
musicSources: '音源設定',
|
||||
musicSourcesDesc: '音楽解析に使用する音源プラットフォームを選択',
|
||||
musicSourcesWarning: '少なくとも1つの音源プラットフォームを選択する必要があります',
|
||||
musicUnblockEnable: '音楽解析を有効にする',
|
||||
musicUnblockEnableDesc: '有効にすると、再生できない音楽の解析を試みます',
|
||||
configureMusicSources: '音源を設定',
|
||||
selectedMusicSources: '選択された音源:',
|
||||
noMusicSources: '音源が選択されていません',
|
||||
gdmusicInfo: 'GD音楽台は複数のプラットフォーム音源を自動解析し、最適な結果を自動選択できます',
|
||||
autoPlay: '自動再生',
|
||||
autoPlayDesc: 'アプリを再起動した際に自動的に再生を継続するかどうか',
|
||||
showStatusBar: 'ステータスバーコントロール機能を表示するかどうか',
|
||||
showStatusBarContent:
|
||||
'Macのステータスバーに音楽コントロール機能を表示できます(再起動後に有効)',
|
||||
fallbackParser: '代替解析サービス (GD音楽台)',
|
||||
fallbackParserDesc:
|
||||
'「GD音楽台」にチェックが入っていて、通常の音源で再生できない場合、このサービスが使用されます。',
|
||||
parserGD: 'GD 音楽台 (内蔵)',
|
||||
parserCustom: 'カスタム API',
|
||||
sourceLabels: {
|
||||
migu: 'Migu',
|
||||
kugou: 'Kugou',
|
||||
pyncmd: 'NetEase (内蔵)',
|
||||
bilibili: 'Bilibili',
|
||||
gdmusic: 'GD 音楽台',
|
||||
custom: 'カスタム API'
|
||||
},
|
||||
customApi: {
|
||||
sectionTitle: 'カスタム API 設定',
|
||||
enableHint:
|
||||
'カスタム API を有効にするには、まずカスタム API をインポートする必要があります。',
|
||||
importConfig: 'JSON設定をインポート',
|
||||
currentSource: '現在の音源',
|
||||
notImported: 'カスタム音源はまだインポートされていません。',
|
||||
importSuccess: '音源のインポートに成功しました: {name}',
|
||||
importFailed: 'インポートに失敗しました: {message}',
|
||||
status: {
|
||||
imported: 'カスタム音源インポート済み',
|
||||
notImported: '未インポート'
|
||||
}
|
||||
},
|
||||
lxMusic: {
|
||||
tabs: {
|
||||
sources: '音源選択',
|
||||
lxMusic: '落雪音源',
|
||||
customApi: 'カスタムAPI'
|
||||
},
|
||||
scripts: {
|
||||
title: 'インポート済みのスクリプト',
|
||||
importLocal: 'ローカルインポート',
|
||||
importOnline: 'オンラインインポート',
|
||||
urlPlaceholder: '落雪音源スクリプトのURLを入力',
|
||||
importBtn: 'インポート',
|
||||
empty: 'インポート済みの落雪音源はありません',
|
||||
notConfigured: '未設定(落雪音源タブで設定してください)',
|
||||
importHint: '互換性のあるカスタムAPIプラグインをインポートして音源を拡張します',
|
||||
noScriptWarning: '先に落雪音源スクリプトをインポートしてください',
|
||||
noSelectionWarning: '先に落雪音源を選択してください',
|
||||
notFound: '音源が存在しません',
|
||||
switched: '音源を切り替えました: {name}',
|
||||
deleted: '音源を削除しました: {name}',
|
||||
enterUrl: 'スクリプトURLを入力してください',
|
||||
invalidUrl: '無効なURL形式',
|
||||
invalidScript: '無効な落雪音源スクリプトです(globalThis.lxが見つかりません)',
|
||||
nameRequired: '名前を空にすることはできません',
|
||||
renameSuccess: '名前を変更しました'
|
||||
}
|
||||
}
|
||||
},
|
||||
application: {
|
||||
closeAction: '閉じる動作',
|
||||
closeActionDesc: 'ウィンドウを閉じる際の動作を選択',
|
||||
closeOptions: {
|
||||
ask: '毎回確認',
|
||||
minimize: 'トレイに最小化',
|
||||
close: '直接終了'
|
||||
},
|
||||
shortcut: 'ショートカット設定',
|
||||
shortcutDesc: 'グローバルショートカットをカスタマイズ',
|
||||
download: 'ダウンロード管理',
|
||||
downloadDesc: 'ダウンロードリストボタンを常に表示するかどうか',
|
||||
unlimitedDownload: '無制限ダウンロード',
|
||||
unlimitedDownloadDesc:
|
||||
'有効にすると音楽を無制限でダウンロードします(ダウンロード失敗の可能性があります)。デフォルトは300曲制限',
|
||||
downloadPath: 'ダウンロードディレクトリ',
|
||||
downloadPathDesc: '音楽ファイルのダウンロード場所を選択',
|
||||
remoteControl: 'リモートコントロール',
|
||||
remoteControlDesc: 'リモートコントロール機能を設定'
|
||||
},
|
||||
network: {
|
||||
apiPort: '音楽APIポート',
|
||||
apiPortDesc: '変更後はアプリの再起動が必要です',
|
||||
proxy: 'プロキシ設定',
|
||||
proxyDesc: '音楽にアクセスできない場合はプロキシを有効にできます',
|
||||
proxyHost: 'プロキシアドレス',
|
||||
proxyHostPlaceholder: 'プロキシアドレスを入力してください',
|
||||
proxyPort: 'プロキシポート',
|
||||
proxyPortPlaceholder: 'プロキシポートを入力してください',
|
||||
realIP: 'realIP設定',
|
||||
realIPDesc:
|
||||
'制限により、このプロジェクトは海外での使用が制限されます。realIPパラメータを使用して国内IPを渡すことで解決できます',
|
||||
messages: {
|
||||
proxySuccess: 'プロキシ設定を保存しました。アプリ再起動後に有効になります',
|
||||
proxyError: '入力が正しいかどうか確認してください',
|
||||
realIPSuccess: '実IPアドレス設定を保存しました',
|
||||
realIPError: '有効なIPアドレスを入力してください'
|
||||
}
|
||||
},
|
||||
system: {
|
||||
cache: 'キャッシュ管理',
|
||||
cacheDesc: 'キャッシュをクリア',
|
||||
cacheClearTitle: 'クリアするキャッシュタイプを選択してください:',
|
||||
cacheTypes: {
|
||||
history: {
|
||||
label: '再生履歴',
|
||||
description: '再生した楽曲の記録をクリア'
|
||||
},
|
||||
favorite: {
|
||||
label: 'お気に入り記録',
|
||||
description: 'ローカルのお気に入り楽曲記録をクリア(クラウドのお気に入りには影響しません)'
|
||||
},
|
||||
user: {
|
||||
label: 'ユーザーデータ',
|
||||
description: 'ログイン情報とユーザー関連データをクリア'
|
||||
},
|
||||
settings: {
|
||||
label: 'アプリ設定',
|
||||
description: 'アプリのすべてのカスタム設定をクリア'
|
||||
},
|
||||
downloads: {
|
||||
label: 'ダウンロード記録',
|
||||
description: 'ダウンロード履歴をクリア(ダウンロード済みファイルは削除されません)'
|
||||
},
|
||||
resources: {
|
||||
label: '音楽リソース',
|
||||
description: '読み込み済みの音楽ファイル、歌詞などのリソースキャッシュをクリア'
|
||||
},
|
||||
lyrics: {
|
||||
label: '歌詞リソース',
|
||||
description: '読み込み済みの歌詞リソースキャッシュをクリア'
|
||||
}
|
||||
},
|
||||
restart: '再起動',
|
||||
restartDesc: 'アプリを再起動',
|
||||
messages: {
|
||||
clearSuccess: 'クリア成功。一部の設定は再起動後に有効になります'
|
||||
}
|
||||
},
|
||||
about: {
|
||||
version: 'バージョン',
|
||||
checkUpdate: '更新を確認',
|
||||
checking: '確認中...',
|
||||
latest: '現在最新バージョンです',
|
||||
hasUpdate: '新しいバージョンが見つかりました',
|
||||
gotoUpdate: '更新へ',
|
||||
gotoGithub: 'Githubへ',
|
||||
author: '作者',
|
||||
authorDesc: 'algerkong スターを付けてください🌟',
|
||||
messages: {
|
||||
checkError: '更新確認に失敗しました。後でもう一度お試しください'
|
||||
}
|
||||
},
|
||||
validation: {
|
||||
selectProxyProtocol: 'プロキシプロトコルを選択してください',
|
||||
proxyHost: 'プロキシアドレスを入力してください',
|
||||
portNumber: '有効なポート番号を入力してください(1-65535)'
|
||||
},
|
||||
lyricSettings: {
|
||||
title: '歌詞設定',
|
||||
tabs: {
|
||||
display: '表示',
|
||||
interface: 'インターフェース',
|
||||
typography: 'テキスト',
|
||||
background: '背景',
|
||||
mobile: 'モバイル'
|
||||
},
|
||||
pureMode: 'ピュアモード',
|
||||
hideCover: 'カバーを非表示',
|
||||
centerDisplay: '中央表示',
|
||||
showTranslation: '翻訳を表示',
|
||||
hideLyrics: '歌詞を非表示',
|
||||
hidePlayBar: '再生バーを非表示',
|
||||
hideMiniPlayBar: 'ミニ再生バーを非表示',
|
||||
showMiniPlayBar: 'ミニ再生バーを表示',
|
||||
backgroundTheme: '背景テーマ',
|
||||
themeOptions: {
|
||||
default: 'デフォルト',
|
||||
light: 'ライト',
|
||||
dark: 'ダーク'
|
||||
},
|
||||
fontSize: 'フォントサイズ',
|
||||
fontSizeMarks: {
|
||||
small: '小',
|
||||
medium: '中',
|
||||
large: '大'
|
||||
},
|
||||
fontWeight: 'フォントの太さ',
|
||||
fontWeightMarks: {
|
||||
thin: '細い',
|
||||
normal: '通常',
|
||||
bold: '太い'
|
||||
},
|
||||
letterSpacing: '文字間隔',
|
||||
letterSpacingMarks: {
|
||||
compact: 'コンパクト',
|
||||
default: 'デフォルト',
|
||||
loose: 'ゆったり'
|
||||
},
|
||||
lineHeight: '行の高さ',
|
||||
lineHeightMarks: {
|
||||
compact: 'コンパクト',
|
||||
default: 'デフォルト',
|
||||
loose: 'ゆったり'
|
||||
},
|
||||
contentWidth: 'コンテンツ幅',
|
||||
mobileLayout: 'モバイルレイアウト',
|
||||
layoutOptions: {
|
||||
default: 'デフォルト',
|
||||
ios: 'iOSスタイル',
|
||||
android: 'Androidスタイル'
|
||||
},
|
||||
mobileCoverStyle: 'カバースタイル',
|
||||
coverOptions: {
|
||||
record: 'レコード',
|
||||
square: '正方形',
|
||||
full: 'フルスクリーン'
|
||||
},
|
||||
lyricLines: '歌詞行数',
|
||||
mobileUnavailable: 'この設定はモバイルでのみ利用可能です',
|
||||
// 背景設定
|
||||
background: {
|
||||
useCustomBackground: 'カスタム背景を使用',
|
||||
backgroundMode: '背景モード',
|
||||
modeOptions: {
|
||||
solid: '単色',
|
||||
gradient: 'グラデーション',
|
||||
image: '画像',
|
||||
css: 'CSS'
|
||||
},
|
||||
solidColor: '色を選択',
|
||||
presetColors: 'プリセットカラー',
|
||||
customColor: 'カスタムカラー',
|
||||
gradientEditor: 'グラデーションエディター',
|
||||
gradientColors: 'グラデーションカラー',
|
||||
gradientDirection: 'グラデーション方向',
|
||||
directionOptions: {
|
||||
toBottom: '上から下',
|
||||
toRight: '左から右',
|
||||
toBottomRight: '左上から右下',
|
||||
angle45: '45度',
|
||||
toTop: '下から上',
|
||||
toLeft: '右から左'
|
||||
},
|
||||
addColor: '色を追加',
|
||||
removeColor: '色を削除',
|
||||
imageUpload: '画像をアップロード',
|
||||
imagePreview: '画像プレビュー',
|
||||
clearImage: '画像をクリア',
|
||||
imageBlur: 'ぼかし',
|
||||
imageBrightness: '明るさ',
|
||||
customCss: 'カスタム CSS スタイル',
|
||||
customCssPlaceholder: 'CSSスタイルを入力、例: background: linear-gradient(...)',
|
||||
customCssHelp: '任意のCSS background プロパティをサポート',
|
||||
reset: 'デフォルトにリセット',
|
||||
fileSizeLimit: '画像サイズ制限: 20MB',
|
||||
invalidImageFormat: '無効な画像形式',
|
||||
imageTooLarge: '画像が大きすぎます。20MB未満の画像を選択してください'
|
||||
}
|
||||
},
|
||||
translationEngine: '歌詞翻訳エンジン',
|
||||
translationEngineOptions: {
|
||||
none: 'オフ',
|
||||
opencc: 'OpenCC 繁体字化'
|
||||
},
|
||||
themeColor: {
|
||||
title: '歌詞テーマカラー',
|
||||
presetColors: 'プリセットカラー',
|
||||
customColor: 'カスタムカラー',
|
||||
preview: 'プレビュー効果',
|
||||
previewText: '歌詞効果',
|
||||
colorNames: {
|
||||
'spotify-green': 'Spotify グリーン',
|
||||
'apple-blue': 'Apple ブルー',
|
||||
'youtube-red': 'YouTube レッド',
|
||||
orange: 'バイタルオレンジ',
|
||||
purple: 'ミステリアスパープル',
|
||||
pink: 'サクラピンク'
|
||||
},
|
||||
tooltips: {
|
||||
openColorPicker: 'カラーパレットを開く',
|
||||
closeColorPicker: 'カラーパレットを閉じる'
|
||||
},
|
||||
placeholder: '#1db954'
|
||||
},
|
||||
shortcutSettings: {
|
||||
title: 'ショートカット設定',
|
||||
shortcut: 'ショートカット',
|
||||
shortcutDesc: 'ショートカットをカスタマイズ',
|
||||
shortcutConflict: 'ショートカットの競合',
|
||||
inputPlaceholder: 'クリックしてショートカットを入力',
|
||||
resetShortcuts: 'デフォルトに戻す',
|
||||
disableAll: 'すべて無効',
|
||||
enableAll: 'すべて有効',
|
||||
togglePlay: '再生/一時停止',
|
||||
prevPlay: '前の曲',
|
||||
nextPlay: '次の曲',
|
||||
volumeUp: '音量を上げる',
|
||||
volumeDown: '音量を下げる',
|
||||
toggleFavorite: 'お気に入り/お気に入り解除',
|
||||
toggleWindow: 'ウィンドウ表示/非表示',
|
||||
scopeGlobal: 'グローバル',
|
||||
scopeApp: 'アプリ内',
|
||||
enabled: '有効',
|
||||
disabled: '無効',
|
||||
messages: {
|
||||
resetSuccess: 'デフォルトのショートカットに戻しました。保存を忘れずに',
|
||||
conflict: '競合するショートカットがあります。再設定してください',
|
||||
saveSuccess: 'ショートカット設定を保存しました',
|
||||
saveError: 'ショートカットの保存に失敗しました。再試行してください',
|
||||
cancelEdit: '変更をキャンセルしました',
|
||||
disableAll: 'すべてのショートカットを無効にしました。保存を忘れずに',
|
||||
enableAll: 'すべてのショートカットを有効にしました。保存を忘れずに'
|
||||
}
|
||||
},
|
||||
remoteControl: {
|
||||
title: 'リモートコントロール',
|
||||
enable: 'リモートコントロールを有効にする',
|
||||
port: 'サービスポート',
|
||||
allowedIps: '許可されたIPアドレス',
|
||||
addIp: 'IPを追加',
|
||||
emptyListHint: '空のリストはすべてのIPアクセスを許可することを意味します',
|
||||
saveSuccess: 'リモートコントロール設定を保存しました',
|
||||
accessInfo: 'リモートコントロールアクセスアドレス:'
|
||||
},
|
||||
cookie: {
|
||||
title: 'Cookie設定',
|
||||
description: 'NetEase Cloud MusicのCookieを入力してください:',
|
||||
placeholder: '完全なCookieを貼り付けてください...',
|
||||
help: {
|
||||
format: 'Cookieは通常「MUSIC_U=」で始まります',
|
||||
source: 'ブラウザの開発者ツールのネットワークリクエストから取得できます',
|
||||
storage: 'Cookie設定後、自動的にローカルストレージに保存されます'
|
||||
},
|
||||
action: {
|
||||
save: 'Cookieを保存',
|
||||
paste: '貼り付け',
|
||||
clear: 'クリア'
|
||||
},
|
||||
validation: {
|
||||
required: 'Cookieを入力してください',
|
||||
format: 'Cookie形式が正しくない可能性があります。MUSIC_Uが含まれているか確認してください'
|
||||
},
|
||||
message: {
|
||||
saveSuccess: 'Cookieの保存に成功しました',
|
||||
saveError: 'Cookieの保存に失敗しました',
|
||||
pasteSuccess: '貼り付けに成功しました',
|
||||
pasteError: '貼り付けに失敗しました。手動でコピーしてください'
|
||||
},
|
||||
info: {
|
||||
length: '現在の長さ:{length} 文字'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -25,4 +25,4 @@ export default {
|
||||
negativeText: 'キャンセル'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,6 +10,11 @@ export default {
|
||||
trackCount: '{count}曲',
|
||||
playCount: '{count}回再生'
|
||||
},
|
||||
tabs: {
|
||||
created: '作成',
|
||||
favorite: 'お気に入り',
|
||||
album: 'アルバム'
|
||||
},
|
||||
ranking: {
|
||||
title: '聴取ランキング',
|
||||
playCount: '{count}回'
|
||||
@@ -45,4 +50,4 @@ export default {
|
||||
deleteSuccess: '削除成功',
|
||||
deleteFailed: '削除失敗'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,4 +2,4 @@ export default {
|
||||
hotSongs: '인기 곡',
|
||||
albums: '앨범',
|
||||
description: '아티스트 소개'
|
||||
};
|
||||
};
|
||||
|
||||
51
src/i18n/lang/ko-KR/bilibili.ts
Normal file
51
src/i18n/lang/ko-KR/bilibili.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export default {
|
||||
player: {
|
||||
loading: '오디오 로딩 중...',
|
||||
retry: '다시 시도',
|
||||
playNow: '지금 재생',
|
||||
loadingTitle: '로딩 중...',
|
||||
totalDuration: '총 재생시간: {duration}',
|
||||
partsList: '파트 목록 ({count}화)',
|
||||
playStarted: '재생이 시작되었습니다',
|
||||
switchingPart: '파트 전환 중: {part}',
|
||||
preloadingNext: '다음 파트 미리 로딩 중: {part}',
|
||||
playingCurrent: '현재 선택된 파트 재생 중: {name}',
|
||||
num: '만',
|
||||
errors: {
|
||||
invalidVideoId: '유효하지 않은 비디오 ID',
|
||||
loadVideoDetailFailed: '비디오 세부정보 로드 실패',
|
||||
loadPartInfoFailed: '비디오 파트 정보를 로드할 수 없습니다',
|
||||
loadAudioUrlFailed: '오디오 재생 URL 가져오기 실패',
|
||||
videoDetailNotLoaded: '비디오 세부정보가 로드되지 않았습니다',
|
||||
missingParams: '필수 매개변수가 누락되었습니다',
|
||||
noAvailableAudioUrl: '사용 가능한 오디오 URL을 찾을 수 없습니다',
|
||||
loadPartAudioFailed: '파트 오디오 URL 로드 실패',
|
||||
audioListEmpty: '오디오 목록이 비어있습니다. 다시 시도해주세요',
|
||||
currentPartNotFound: '현재 파트의 오디오를 찾을 수 없습니다',
|
||||
audioUrlFailed: '오디오 URL 가져오기 실패',
|
||||
playFailed: '재생 실패. 다시 시도해주세요',
|
||||
getAudioUrlFailed: '오디오 URL 가져오기 실패. 다시 시도해주세요',
|
||||
audioNotFound: '해당 오디오를 찾을 수 없습니다. 다시 시도해주세요',
|
||||
preloadFailed: '다음 파트 미리 로딩 실패',
|
||||
switchPartFailed: '파트 전환 시 오디오 URL 로드 실패'
|
||||
},
|
||||
console: {
|
||||
loadingDetail: 'Bilibili 비디오 세부정보 로딩 중',
|
||||
detailData: 'Bilibili 비디오 세부정보 데이터',
|
||||
multipleParts: '비디오에 여러 파트가 있습니다. 총 {count}개',
|
||||
noPartsData: '비디오에 파트가 없거나 파트 데이터가 비어있습니다',
|
||||
loadingAudioSource: '오디오 소스 로딩 중',
|
||||
generatedAudioList: '오디오 목록을 생성했습니다. 총 {count}개',
|
||||
getDashAudioUrl: 'dash 오디오 URL을 가져왔습니다',
|
||||
getDurlAudioUrl: 'durl 오디오 URL을 가져왔습니다',
|
||||
loadingPartAudio: '파트 오디오 URL 로딩 중: {part}, cid: {cid}',
|
||||
loadPartAudioFailed: '파트 오디오 URL 로드 실패: {part}',
|
||||
switchToPart: '파트로 전환 중: {part}',
|
||||
audioNotFoundInList: '해당 오디오 항목을 찾을 수 없습니다',
|
||||
preparingToPlay: '현재 선택된 파트 재생 준비 중: {name}',
|
||||
preloadingNextPart: '다음 파트 미리 로딩 중: {part}',
|
||||
playingSelectedPart: '현재 선택된 파트 재생 중: {name}, 오디오 URL: {url}',
|
||||
preloadNextFailed: '다음 파트 미리 로딩 실패'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -43,6 +43,8 @@ export default {
|
||||
collapse: '접기',
|
||||
songCount: '{count}곡',
|
||||
language: '언어',
|
||||
today: '오늘',
|
||||
yesterday: '어제',
|
||||
tray: {
|
||||
show: '표시',
|
||||
quit: '종료',
|
||||
@@ -53,4 +55,4 @@ export default {
|
||||
play: '재생',
|
||||
favorite: '즐겨찾기'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,7 +41,8 @@ export default {
|
||||
noDownloadUrl: '현재 시스템에 적합한 설치 패키지를 찾을 수 없습니다. 수동으로 다운로드해주세요',
|
||||
installConfirmTitle: '업데이트 설치',
|
||||
installConfirmContent: '앱을 닫고 업데이트를 설치하시겠습니까?',
|
||||
manualInstallTip: '앱을 닫은 후 설치 프로그램이 정상적으로 나타나지 않으면 다운로드 폴더에서 파일을 찾아 수동으로 열어주세요.',
|
||||
manualInstallTip:
|
||||
'앱을 닫은 후 설치 프로그램이 정상적으로 나타나지 않으면 다운로드 폴더에서 파일을 찾아 수동으로 열어주세요.',
|
||||
yesInstall: '지금 설치',
|
||||
noThanks: '나중에 설치',
|
||||
fileLocation: '파일 위치',
|
||||
@@ -50,6 +51,31 @@ export default {
|
||||
copyFailed: '복사 실패',
|
||||
backgroundDownload: '백그라운드 다운로드'
|
||||
},
|
||||
disclaimer: {
|
||||
title: '이용 안내',
|
||||
warning:
|
||||
'본 앱은 개발 테스트 버전으로 기능이 아직 미흡하며, 다수의 문제와 버그가 존재할 수 있습니다. 학습 및 교류 목적으로만 사용하십시오.',
|
||||
item1:
|
||||
'본 앱은 개인의 학습, 연구 및 기술 교류 목적으로만 사용되며, 상업적 용도로 사용하지 마십시오.',
|
||||
item2:
|
||||
'다운로드 후 24시간 이내에 삭제해 주십시오. 장기 사용을 원하시면 정품 음악 서비스를 이용해 주십시오.',
|
||||
item3:
|
||||
'본 앱을 사용함으로써 관련 위험을 이해하고 감수하는 것으로 간주합니다. 개발자는 어떠한 손실에 대해서도 책임을 지지 않습니다.',
|
||||
agree: '숙지하였으며 이에 동의합니다',
|
||||
disagree: '동의하지 않음 및 정지'
|
||||
},
|
||||
donate: {
|
||||
title: '개발자 지원',
|
||||
subtitle: '여러분의 지원이 저의 원동력입니다',
|
||||
tip: '후원은 완전히 자율적입니다. 후원하지 않더라도 모든 기능을 정상적으로 사용할 수 있습니다. 이해와 지원에 감사드립니다!',
|
||||
wechat: 'WeChat',
|
||||
alipay: 'Alipay',
|
||||
wechatQR: 'WeChat 결제 코드',
|
||||
alipayQR: 'Alipay 결제 코드',
|
||||
scanTip: '휴대전화로 위 QR 코드를 스캔하여 후원해 주세요',
|
||||
enterApp: '앱 시작하기',
|
||||
noForce: '후원은 강제가 아닙니다. 클릭하여 시작할 수 있습니다'
|
||||
},
|
||||
coffee: {
|
||||
title: '커피 한 잔 사주세요',
|
||||
alipay: '알리페이',
|
||||
@@ -117,7 +143,11 @@ export default {
|
||||
cancelCollect: '수집 취소',
|
||||
addToPlaylist: '재생 목록에 추가',
|
||||
addToPlaylistSuccess: '재생 목록에 추가 성공',
|
||||
songsAlreadyInPlaylist: '곡이 이미 재생 목록에 있습니다'
|
||||
songsAlreadyInPlaylist: '곡이 이미 재생 목록에 있습니다',
|
||||
historyRecommend: '일일 기록 권장',
|
||||
fetchDatesFailed: '날짜를 가져오지 못했습니다',
|
||||
fetchSongsFailed: '곡을 가져오지 못했습니다',
|
||||
noSongs: '노래 없음'
|
||||
},
|
||||
playlist: {
|
||||
import: {
|
||||
@@ -172,7 +202,8 @@ export default {
|
||||
noTasks: '가져오기 작업이 없습니다',
|
||||
clearTasks: '작업 지우기',
|
||||
clearTasksConfirmTitle: '지우기 확인',
|
||||
clearTasksConfirmContent: '모든 가져오기 작업 기록을 지우시겠습니까? 이 작업은 되돌릴 수 없습니다.',
|
||||
clearTasksConfirmContent:
|
||||
'모든 가져오기 작업 기록을 지우시겠습니까? 이 작업은 되돌릴 수 없습니다.',
|
||||
confirm: '확인',
|
||||
cancel: '취소',
|
||||
clearTasksSuccess: '작업 목록이 지워졌습니다',
|
||||
@@ -187,4 +218,4 @@ export default {
|
||||
mv: 'MV',
|
||||
home: '홈',
|
||||
search: '검색'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
export default {
|
||||
description: '귀하의 기부는 서버 유지보수, 도메인 갱신 등을 포함한 개발 및 유지보수 작업을 지원하는 데 사용됩니다.',
|
||||
description:
|
||||
'귀하의 기부는 서버 유지보수, 도메인 갱신 등을 포함한 개발 및 유지보수 작업을 지원하는 데 사용됩니다.',
|
||||
message: '메시지를 남길 때 이메일이나 GitHub 이름을 남겨주세요.',
|
||||
refresh: '목록 새로고침',
|
||||
toDonateList: '커피 한 잔 사주세요',
|
||||
noMessage: '메시지가 없습니다',
|
||||
title: '기부 목록'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -36,7 +36,8 @@ export default {
|
||||
},
|
||||
clear: {
|
||||
title: '다운로드 기록 지우기',
|
||||
message: '모든 다운로드 기록을 지우시겠습니까? 이 작업은 다운로드된 음악 파일을 삭제하지 않지만 모든 기록을 지웁니다.',
|
||||
message:
|
||||
'모든 다운로드 기록을 지우시겠습니까? 이 작업은 다운로드된 음악 파일을 삭제하지 않지만 모든 기록을 지웁니다.',
|
||||
confirm: '지우기 확인',
|
||||
cancel: '취소',
|
||||
success: '다운로드 기록이 지워졌습니다'
|
||||
@@ -84,4 +85,4 @@ export default {
|
||||
albumName: '앨범명'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,4 +10,4 @@ export default {
|
||||
selectSongsFirst: '먼저 다운로드할 곡을 선택해주세요',
|
||||
descending: '내림차순',
|
||||
ascending: '오름차순'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
export default {
|
||||
title: '재생 기록',
|
||||
heatmapTitle: '히트맵',
|
||||
playCount: '{count}',
|
||||
getHistoryFailed: '기록 가져오기 실패'
|
||||
};
|
||||
getHistoryFailed: '기록 가져오기 실패',
|
||||
tabs: {
|
||||
all: '전체 기록',
|
||||
local: '로컬 기록',
|
||||
cloud: '클라우드 기록'
|
||||
},
|
||||
categoryTabs: {
|
||||
songs: '곡',
|
||||
playlists: '플레이리스트',
|
||||
albums: '앨범'
|
||||
},
|
||||
noDescription: '설명 없음',
|
||||
noData: '기록 없음',
|
||||
getCloudRecordFailed: '클라우드 기록 가져오기 실패',
|
||||
needLogin: 'cookie를 사용하여 로그인하여 클라우드 기록을 볼 수 있습니다',
|
||||
merging: '기록 병합 중...',
|
||||
heatmap: {
|
||||
title: '재생 히트맵',
|
||||
loading: '데이터 로딩 중...',
|
||||
unit: '회 재생',
|
||||
footerText: '마우스를 올려서 자세히 보기',
|
||||
playCount: '{count}회 재생',
|
||||
topSongs: '오늘의 인기곡',
|
||||
times: '회',
|
||||
totalPlays: '총 재생 횟수',
|
||||
activeDays: '활동 일수',
|
||||
noData: '재생 기록이 없습니다',
|
||||
colorTheme: '색상 테마',
|
||||
colors: {
|
||||
green: '그린',
|
||||
blue: '블루',
|
||||
orange: '오렌지',
|
||||
purple: '퍼플',
|
||||
red: '레드'
|
||||
},
|
||||
mostPlayedSong: '가장 많이 재생한 노래',
|
||||
mostActiveDay: '가장 활발한 날',
|
||||
latestNightSong: '가장 늘게 재생한 노래'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,8 +41,24 @@ export default {
|
||||
uidLoginFailed: 'UID 로그인에 실패했습니다. 사용자 ID가 올바른지 확인하세요',
|
||||
autoGetCookieSuccess: 'Cookie 자동 가져오기 성공',
|
||||
autoGetCookieFailed: 'Cookie 자동 가져오기 실패',
|
||||
autoGetCookieTip: '넷이즈 클라우드 뮤직 로그인 페이지를 열겠습니다. 로그인 완료 후 창을 닫아주세요'
|
||||
autoGetCookieTip:
|
||||
'넷이즈 클라우드 뮤직 로그인 페이지를 열겠습니다. 로그인 완료 후 창을 닫아주세요',
|
||||
loginFailed: '로그인 실패',
|
||||
phoneRequired: '휴대폰 번호를 입력하세요',
|
||||
passwordRequired: '비밀번호를 입력하세요',
|
||||
phoneLoginFailed: '휴대폰 번호 로그인 실패, 휴대폰 번호와 비밀번호가 올바른지 확인하세요',
|
||||
qrCheckFailed: 'QR코드 상태 확인 실패, 새로고침하여 다시 시도하세요',
|
||||
qrLoading: 'QR코드 로딩 중...',
|
||||
qrExpired: 'QR코드가 만료되었습니다. 클릭하여 새로고침하세요',
|
||||
qrExpiredShort: 'QR코드 만료됨',
|
||||
qrExpiredWarning: 'QR코드가 만료되었습니다. 클릭하여 새로운 QR코드를 받으세요',
|
||||
qrScanned: 'QR코드가 스캔되었습니다. 휴대폰에서 로그인을 확인하세요',
|
||||
qrScannedShort: '스캔됨',
|
||||
qrScannedInfo: 'QR코드가 스캔되었습니다. 휴대폰에서 로그인을 확인하세요',
|
||||
qrConfirmed: '로그인 성공, 리다이렉트 중...',
|
||||
qrGenerating: 'QR코드를 생성 중...'
|
||||
},
|
||||
qrTitle: '넷이즈 클라우드 뮤직 QR코드 로그인',
|
||||
uidWarning: '주의: UID 로그인은 사용자 공개 정보를 확인하는 데만 사용할 수 있으며, 로그인 권한이 필요한 기능에 액세스할 수 없습니다.'
|
||||
};
|
||||
uidWarning:
|
||||
'주의: UID 로그인은 사용자 공개 정보를 확인하는 데만 사용할 수 있으며, 로그인 권한이 필요한 기능에 액세스할 수 없습니다.'
|
||||
};
|
||||
|
||||
@@ -1,122 +1,143 @@
|
||||
export default {
|
||||
nowPlaying: '현재 재생 중',
|
||||
playlist: '재생 목록',
|
||||
lyrics: '가사',
|
||||
previous: '이전',
|
||||
play: '재생',
|
||||
pause: '일시정지',
|
||||
next: '다음',
|
||||
volumeUp: '볼륨 증가',
|
||||
volumeDown: '볼륨 감소',
|
||||
mute: '음소거',
|
||||
unmute: '음소거 해제',
|
||||
songNum: '총 곡 수: {num}',
|
||||
addCorrection: '{num}초 앞당기기',
|
||||
subtractCorrection: '{num}초 지연',
|
||||
playFailed: '현재 곡 재생 실패, 다음 곡 재생',
|
||||
playMode: {
|
||||
sequence: '순차 재생',
|
||||
loop: '한 곡 반복',
|
||||
random: '랜덤 재생'
|
||||
},
|
||||
fullscreen: {
|
||||
enter: '전체화면',
|
||||
exit: '전체화면 종료'
|
||||
},
|
||||
close: '닫기',
|
||||
modeHint: {
|
||||
single: '한 곡 반복',
|
||||
list: '자동으로 다음 곡 재생'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '가사가 없습니다. 음악을 감상해주세요'
|
||||
},
|
||||
reparse: {
|
||||
title: '음원 선택',
|
||||
desc: '음원을 클릭하여 직접 분석하세요. 다음에 이 곡을 재생할 때 선택한 음원을 사용합니다',
|
||||
success: '재분석 성공',
|
||||
failed: '재분석 실패',
|
||||
warning: '음원을 선택해주세요',
|
||||
bilibiliNotSupported: 'B站 비디오는 재분석을 지원하지 않습니다',
|
||||
processing: '분석 중...',
|
||||
clear: '사용자 정의 음원 지우기'
|
||||
},
|
||||
playBar: {
|
||||
expand: '가사 펼치기',
|
||||
collapse: '가사 접기',
|
||||
like: '좋아요',
|
||||
lyric: '가사',
|
||||
noSongPlaying: '재생 중인 곡이 없습니다',
|
||||
eq: '이퀄라이저',
|
||||
playList: '재생 목록',
|
||||
reparse: '재분석',
|
||||
playMode: {
|
||||
sequence: '순차 재생',
|
||||
loop: '반복 재생',
|
||||
random: '랜덤 재생'
|
||||
},
|
||||
play: '재생 시작',
|
||||
pause: '재생 일시정지',
|
||||
prev: '이전 곡',
|
||||
next: '다음 곡',
|
||||
volume: '볼륨',
|
||||
favorite: '{name} 즐겨찾기 추가됨',
|
||||
unFavorite: '{name} 즐겨찾기 해제됨',
|
||||
miniPlayBar: '미니 재생바',
|
||||
playbackSpeed: '재생 속도',
|
||||
advancedControls: '고급 설정'
|
||||
},
|
||||
eq: {
|
||||
title: '이퀄라이저',
|
||||
reset: '재설정',
|
||||
on: '켜기',
|
||||
off: '끄기',
|
||||
bass: '저음',
|
||||
midrange: '중음',
|
||||
treble: '고음',
|
||||
presets: {
|
||||
flat: '플랫',
|
||||
pop: '팝',
|
||||
rock: '록',
|
||||
classical: '클래식',
|
||||
jazz: '재즈',
|
||||
electronic: '일렉트로닉',
|
||||
hiphop: '힙합',
|
||||
rb: 'R&B',
|
||||
metal: '메탈',
|
||||
vocal: '보컬',
|
||||
dance: '댄스',
|
||||
acoustic: '어쿠스틱',
|
||||
custom: '사용자 정의'
|
||||
}
|
||||
},
|
||||
sleepTimer: {
|
||||
title: '타이머 종료',
|
||||
cancel: '타이머 취소',
|
||||
timeMode: '시간으로 종료',
|
||||
songsMode: '곡 수로 종료',
|
||||
playlistEnd: '재생 목록 완료 후 종료',
|
||||
afterPlaylist: '재생 목록 완료 후 종료',
|
||||
activeUntilEnd: '목록 끝까지 재생',
|
||||
minutes: '분',
|
||||
hours: '시간',
|
||||
songs: '곡',
|
||||
set: '설정',
|
||||
timerSetSuccess: '{minutes}분 후 종료로 설정됨',
|
||||
songsSetSuccess: '{songs}곡 재생 후 종료로 설정됨',
|
||||
playlistEndSetSuccess: '재생 목록 완료 후 종료로 설정됨',
|
||||
timerCancelled: '타이머 종료 취소됨',
|
||||
timerEnded: '타이머 종료 실행됨',
|
||||
playbackStopped: '음악 재생이 중지됨',
|
||||
minutesRemaining: '남은 시간 {minutes}분',
|
||||
songsRemaining: '남은 곡 수 {count}곡'
|
||||
},
|
||||
playList: {
|
||||
clearAll: '재생 목록 비우기',
|
||||
alreadyEmpty: '재생 목록이 이미 비어있습니다',
|
||||
cleared: '재생 목록이 비워졌습니다',
|
||||
empty: '재생 목록이 비어있습니다',
|
||||
clearConfirmTitle: '재생 목록 비우기',
|
||||
clearConfirmContent: '재생 목록의 모든 곡을 삭제하고 현재 재생을 중지합니다. 계속하시겠습니까?'
|
||||
}
|
||||
};
|
||||
export default {
|
||||
nowPlaying: '현재 재생 중',
|
||||
playlist: '재생 목록',
|
||||
lyrics: '가사',
|
||||
previous: '이전',
|
||||
play: '재생',
|
||||
pause: '일시정지',
|
||||
next: '다음',
|
||||
volumeUp: '볼륨 증가',
|
||||
volumeDown: '볼륨 감소',
|
||||
mute: '음소거',
|
||||
unmute: '음소거 해제',
|
||||
songNum: '총 곡 수: {num}',
|
||||
addCorrection: '{num}초 앞당기기',
|
||||
subtractCorrection: '{num}초 지연',
|
||||
playFailed: '현재 곡 재생 실패, 다음 곡 재생',
|
||||
parseFailedPlayNext: '곡 분석 실패, 다음 곡 재생',
|
||||
consecutiveFailsError:
|
||||
'재생 오류가 발생했습니다. 네트워크 문제 또는 유효하지 않은 음원일 수 있습니다. 재생 목록을 변경하거나 나중에 다시 시도하세요',
|
||||
playMode: {
|
||||
sequence: '순차 재생',
|
||||
loop: '한 곡 반복',
|
||||
random: '랜덤 재생'
|
||||
},
|
||||
fullscreen: {
|
||||
enter: '전체화면',
|
||||
exit: '전체화면 종료'
|
||||
},
|
||||
close: '닫기',
|
||||
modeHint: {
|
||||
single: '한 곡 반복',
|
||||
list: '자동으로 다음 곡 재생'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '가사가 없습니다. 음악을 감상해주세요',
|
||||
noAutoScroll: '본 가사는 자동 스크롤을 지원하지 않습니다'
|
||||
},
|
||||
reparse: {
|
||||
title: '음원 선택',
|
||||
desc: '음원을 클릭하여 직접 분석하세요. 다음에 이 곡을 재생할 때 선택한 음원을 사용합니다',
|
||||
success: '재분석 성공',
|
||||
failed: '재분석 실패',
|
||||
warning: '음원을 선택해주세요',
|
||||
bilibiliNotSupported: 'B站 비디오는 재분석을 지원하지 않습니다',
|
||||
processing: '분석 중...',
|
||||
clear: '사용자 정의 음원 지우기',
|
||||
customApiFailed: '사용자 정의 API 분석 실패, 기본 음원을 시도합니다...',
|
||||
customApiError: '사용자 정의 API 요청 오류, 기본 음원을 시도합니다...'
|
||||
},
|
||||
playBar: {
|
||||
expand: '가사 펼치기',
|
||||
collapse: '가사 접기',
|
||||
like: '좋아요',
|
||||
lyric: '가사',
|
||||
noSongPlaying: '재생 중인 곡이 없습니다',
|
||||
eq: '이퀄라이저',
|
||||
playList: '재생 목록',
|
||||
reparse: '재분석',
|
||||
playMode: {
|
||||
sequence: '순차 재생',
|
||||
loop: '반복 재생',
|
||||
random: '랜덤 재생'
|
||||
},
|
||||
play: '재생 시작',
|
||||
pause: '재생 일시정지',
|
||||
prev: '이전 곡',
|
||||
next: '다음 곡',
|
||||
volume: '볼륨',
|
||||
favorite: '{name} 즐겨찾기 추가됨',
|
||||
unFavorite: '{name} 즐겨찾기 해제됨',
|
||||
miniPlayBar: '미니 재생바',
|
||||
playbackSpeed: '재생 속도',
|
||||
advancedControls: '고급 설정',
|
||||
intelligenceMode: {
|
||||
title: '인텔리전스 모드',
|
||||
needCookieLogin: '쿠키 방식으로 로그인한 후 인텔리전스 모드를 사용할 수 있습니다',
|
||||
noFavoritePlaylist: '내가 좋아하는 음악 재생목록을 찾을 수 없습니다',
|
||||
noLikedSongs: '아직 좋아한 노래가 없습니다',
|
||||
loading: '인텔리전스 모드를 불러오는 중',
|
||||
success: '총 {count}곡을 불러왔습니다',
|
||||
failed: '인텔리전스 모드 목록을 가져오는 데 실패했습니다',
|
||||
error: '인텔리전스 모드 재생 오류'
|
||||
}
|
||||
},
|
||||
eq: {
|
||||
title: '이퀄라이저',
|
||||
reset: '재설정',
|
||||
on: '켜기',
|
||||
off: '끄기',
|
||||
bass: '저음',
|
||||
midrange: '중음',
|
||||
treble: '고음',
|
||||
presets: {
|
||||
flat: '플랫',
|
||||
pop: '팝',
|
||||
rock: '록',
|
||||
classical: '클래식',
|
||||
jazz: '재즈',
|
||||
electronic: '일렉트로닉',
|
||||
hiphop: '힙합',
|
||||
rb: 'R&B',
|
||||
metal: '메탈',
|
||||
vocal: '보컬',
|
||||
dance: '댄스',
|
||||
acoustic: '어쿠스틱',
|
||||
custom: '사용자 정의'
|
||||
}
|
||||
},
|
||||
// 플레이어 설정
|
||||
settings: {
|
||||
title: '재생 설정',
|
||||
playbackSpeed: '재생 속도'
|
||||
},
|
||||
sleepTimer: {
|
||||
title: '타이머 종료',
|
||||
cancel: '타이머 취소',
|
||||
timeMode: '시간으로 종료',
|
||||
songsMode: '곡 수로 종료',
|
||||
playlistEnd: '재생 목록 완료 후 종료',
|
||||
afterPlaylist: '재생 목록 완료 후 종료',
|
||||
activeUntilEnd: '목록 끝까지 재생',
|
||||
minutes: '분',
|
||||
hours: '시간',
|
||||
songs: '곡',
|
||||
set: '설정',
|
||||
timerSetSuccess: '{minutes}분 후 종료로 설정됨',
|
||||
songsSetSuccess: '{songs}곡 재생 후 종료로 설정됨',
|
||||
playlistEndSetSuccess: '재생 목록 완료 후 종료로 설정됨',
|
||||
timerCancelled: '타이머 종료 취소됨',
|
||||
timerEnded: '타이머 종료 실행됨',
|
||||
playbackStopped: '음악 재생이 중지됨',
|
||||
minutesRemaining: '남은 시간 {minutes}분',
|
||||
songsRemaining: '남은 곡 수 {count}곡'
|
||||
},
|
||||
playList: {
|
||||
clearAll: '재생 목록 비우기',
|
||||
alreadyEmpty: '재생 목록이 이미 비어있습니다',
|
||||
cleared: '재생 목록이 비워졌습니다',
|
||||
empty: '재생 목록이 비어있습니다',
|
||||
clearConfirmTitle: '재생 목록 비우기',
|
||||
clearConfirmContent: '재생 목록의 모든 곡을 삭제하고 현재 재생을 중지합니다. 계속하시겠습니까?'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,8 @@ export default {
|
||||
},
|
||||
loading: {
|
||||
more: '로딩 중...',
|
||||
failed: '검색 실패'
|
||||
failed: '검색 실패',
|
||||
searching: '검색 중...'
|
||||
},
|
||||
noMore: '더 이상 없음',
|
||||
error: {
|
||||
@@ -23,5 +24,8 @@ export default {
|
||||
playlist: '플레이리스트',
|
||||
mv: 'MV',
|
||||
bilibili: 'B站'
|
||||
}
|
||||
};
|
||||
},
|
||||
history: '검색 기록',
|
||||
hot: '인기 검색',
|
||||
suggestions: '검색 제안'
|
||||
};
|
||||
|
||||
@@ -1,322 +1,442 @@
|
||||
export default {
|
||||
theme: '테마',
|
||||
language: '언어',
|
||||
regard: '정보',
|
||||
logout: '로그아웃',
|
||||
sections: {
|
||||
basic: '기본 설정',
|
||||
playback: '재생 설정',
|
||||
application: '애플리케이션 설정',
|
||||
network: '네트워크 설정',
|
||||
system: '시스템 관리',
|
||||
donation: '후원 지원',
|
||||
regard: '정보'
|
||||
},
|
||||
basic: {
|
||||
themeMode: '테마 모드',
|
||||
themeModeDesc: '낮/밤 테마 전환',
|
||||
autoTheme: '시스템 따라가기',
|
||||
manualTheme: '수동 전환',
|
||||
language: '언어 설정',
|
||||
languageDesc: '표시 언어 전환',
|
||||
tokenManagement: 'Cookie 관리',
|
||||
tokenManagementDesc: '넷이즈 클라우드 뮤직 로그인 Cookie 관리',
|
||||
tokenStatus: '현재 Cookie 상태',
|
||||
tokenSet: '설정됨',
|
||||
tokenNotSet: '설정되지 않음',
|
||||
setToken: 'Cookie 설정',
|
||||
modifyToken: 'Cookie 수정',
|
||||
clearToken: 'Cookie 지우기',
|
||||
font: '폰트 설정',
|
||||
fontDesc: '폰트 선택, 앞에 있는 폰트를 우선 사용',
|
||||
fontScope: {
|
||||
global: '전역',
|
||||
lyric: '가사만'
|
||||
},
|
||||
animation: '애니메이션 속도',
|
||||
animationDesc: '애니메이션 활성화 여부',
|
||||
animationSpeed: {
|
||||
slow: '매우 느림',
|
||||
normal: '보통',
|
||||
fast: '매우 빠름'
|
||||
},
|
||||
fontPreview: {
|
||||
title: '폰트 미리보기',
|
||||
chinese: '中文',
|
||||
english: 'English',
|
||||
japanese: '日本語',
|
||||
korean: '한국어',
|
||||
chineseText: '静夜思 床前明月光 疑是地上霜',
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
}
|
||||
},
|
||||
playback: {
|
||||
quality: '음질 설정',
|
||||
qualityDesc: '음악 재생 음질 선택 (넷이즈 클라우드 VIP)',
|
||||
qualityOptions: {
|
||||
standard: '표준',
|
||||
higher: '높음',
|
||||
exhigh: '매우 높음',
|
||||
lossless: '무손실',
|
||||
hires: 'Hi-Res',
|
||||
jyeffect: 'HD 서라운드',
|
||||
sky: '몰입형 서라운드',
|
||||
dolby: '돌비 애트모스',
|
||||
jymaster: '초고화질 마스터'
|
||||
},
|
||||
musicSources: '음원 설정',
|
||||
musicSourcesDesc: '음악 해석에 사용할 음원 플랫폼 선택',
|
||||
musicSourcesWarning: '최소 하나의 음원 플랫폼을 선택해야 합니다',
|
||||
musicUnblockEnable: '음악 해석 활성화',
|
||||
musicUnblockEnableDesc: '활성화하면 재생할 수 없는 음악을 해석하려고 시도합니다',
|
||||
configureMusicSources: '음원 구성',
|
||||
selectedMusicSources: '선택된 음원:',
|
||||
noMusicSources: '음원이 선택되지 않음',
|
||||
gdmusicInfo: 'GD 뮤직은 여러 플랫폼 음원을 자동으로 해석하고 최적의 결과를 자동 선택합니다',
|
||||
autoPlay: '자동 재생',
|
||||
autoPlayDesc: '앱을 다시 열 때 자동으로 재생을 계속할지 여부',
|
||||
showStatusBar: '상태바 제어 기능 표시 여부',
|
||||
showStatusBarContent: 'Mac 상태바에 음악 제어 기능을 표시할 수 있습니다 (재시작 후 적용)'
|
||||
},
|
||||
application: {
|
||||
closeAction: '닫기 동작',
|
||||
closeActionDesc: '창을 닫을 때의 동작 선택',
|
||||
closeOptions: {
|
||||
ask: '매번 묻기',
|
||||
minimize: '트레이로 최소화',
|
||||
close: '직접 종료'
|
||||
},
|
||||
shortcut: '단축키 설정',
|
||||
shortcutDesc: '전역 단축키 사용자 정의',
|
||||
download: '다운로드 관리',
|
||||
downloadDesc: '다운로드 목록 버튼을 항상 표시할지 여부',
|
||||
unlimitedDownload: '무제한 다운로드',
|
||||
unlimitedDownloadDesc: '활성화하면 음악을 무제한으로 다운로드합니다 (다운로드 실패가 발생할 수 있음), 기본 제한 300곡',
|
||||
downloadPath: '다운로드 디렉토리',
|
||||
downloadPathDesc: '음악 파일의 다운로드 위치 선택',
|
||||
remoteControl: '원격 제어',
|
||||
remoteControlDesc: '원격 제어 기능 설정'
|
||||
},
|
||||
network: {
|
||||
apiPort: '음악 API 포트',
|
||||
apiPortDesc: '수정 후 앱을 재시작해야 합니다',
|
||||
proxy: '프록시 설정',
|
||||
proxyDesc: '음악에 액세스할 수 없을 때 프록시를 활성화할 수 있습니다',
|
||||
proxyHost: '프록시 주소',
|
||||
proxyHostPlaceholder: '프록시 주소를 입력하세요',
|
||||
proxyPort: '프록시 포트',
|
||||
proxyPortPlaceholder: '프록시 포트를 입력하세요',
|
||||
realIP: 'realIP 설정',
|
||||
realIPDesc: '제한으로 인해 이 프로젝트는 해외에서 사용할 때 제한을 받을 수 있으며, realIP 매개변수를 사용하여 국내 IP를 전달하여 해결할 수 있습니다',
|
||||
messages: {
|
||||
proxySuccess: '프록시 설정이 저장되었습니다. 앱을 재시작한 후 적용됩니다',
|
||||
proxyError: '입력이 올바른지 확인하세요',
|
||||
realIPSuccess: '실제 IP 설정이 저장되었습니다',
|
||||
realIPError: '유효한 IP 주소를 입력하세요'
|
||||
}
|
||||
},
|
||||
system: {
|
||||
cache: '캐시 관리',
|
||||
cacheDesc: '캐시 지우기',
|
||||
cacheClearTitle: '지울 캐시 유형을 선택하세요:',
|
||||
cacheTypes: {
|
||||
history: {
|
||||
label: '재생 기록',
|
||||
description: '재생한 곡 기록 지우기'
|
||||
},
|
||||
favorite: {
|
||||
label: '즐겨찾기 기록',
|
||||
description: '로컬 즐겨찾기 곡 기록 지우기 (클라우드 즐겨찾기에는 영향 없음)'
|
||||
},
|
||||
user: {
|
||||
label: '사용자 데이터',
|
||||
description: '로그인 정보 및 사용자 관련 데이터 지우기'
|
||||
},
|
||||
settings: {
|
||||
label: '앱 설정',
|
||||
description: '앱의 모든 사용자 정의 설정 지우기'
|
||||
},
|
||||
downloads: {
|
||||
label: '다운로드 기록',
|
||||
description: '다운로드 기록 지우기 (다운로드된 파일은 삭제되지 않음)'
|
||||
},
|
||||
resources: {
|
||||
label: '음악 리소스',
|
||||
description: '로드된 음악 파일, 가사 등 리소스 캐시 지우기'
|
||||
},
|
||||
lyrics: {
|
||||
label: '가사 리소스',
|
||||
description: '로드된 가사 리소스 캐시 지우기'
|
||||
}
|
||||
},
|
||||
restart: '재시작',
|
||||
restartDesc: '앱 재시작',
|
||||
messages: {
|
||||
clearSuccess: '지우기 성공, 일부 설정은 재시작 후 적용됩니다'
|
||||
}
|
||||
},
|
||||
about: {
|
||||
version: '버전',
|
||||
checkUpdate: '업데이트 확인',
|
||||
checking: '확인 중...',
|
||||
latest: '현재 최신 버전입니다',
|
||||
hasUpdate: '새 버전 발견',
|
||||
gotoUpdate: '업데이트하러 가기',
|
||||
gotoGithub: 'Github로 이동',
|
||||
author: '작성자',
|
||||
authorDesc: 'algerkong 별점🌟 부탁드려요',
|
||||
messages: {
|
||||
checkError: '업데이트 확인 실패, 나중에 다시 시도하세요'
|
||||
}
|
||||
},
|
||||
validation: {
|
||||
selectProxyProtocol: '프록시 프로토콜을 선택하세요',
|
||||
proxyHost: '프록시 주소를 입력하세요',
|
||||
portNumber: '유효한 포트 번호를 입력하세요 (1-65535)'
|
||||
},
|
||||
lyricSettings: {
|
||||
title: '가사 설정',
|
||||
tabs: {
|
||||
display: '표시',
|
||||
interface: '인터페이스',
|
||||
typography: '텍스트',
|
||||
mobile: '모바일'
|
||||
},
|
||||
pureMode: '순수 모드',
|
||||
hideCover: '커버 숨기기',
|
||||
centerDisplay: '중앙 표시',
|
||||
showTranslation: '번역 표시',
|
||||
hideLyrics: '가사 숨기기',
|
||||
hidePlayBar: '재생바 숨기기',
|
||||
hideMiniPlayBar: '미니 재생바 숨기기',
|
||||
showMiniPlayBar: '미니 재생바 표시',
|
||||
backgroundTheme: '배경 테마',
|
||||
themeOptions: {
|
||||
default: '기본',
|
||||
light: '밝음',
|
||||
dark: '어둠'
|
||||
},
|
||||
fontSize: '폰트 크기',
|
||||
fontSizeMarks: {
|
||||
small: '작음',
|
||||
medium: '중간',
|
||||
large: '큼'
|
||||
},
|
||||
letterSpacing: '글자 간격',
|
||||
letterSpacingMarks: {
|
||||
compact: '좁음',
|
||||
default: '기본',
|
||||
loose: '넓음'
|
||||
},
|
||||
lineHeight: '줄 높이',
|
||||
lineHeightMarks: {
|
||||
compact: '좁음',
|
||||
default: '기본',
|
||||
loose: '넓음'
|
||||
},
|
||||
mobileLayout: '모바일 레이아웃',
|
||||
layoutOptions: {
|
||||
default: '기본',
|
||||
ios: 'iOS 스타일',
|
||||
android: '안드로이드 스타일'
|
||||
},
|
||||
mobileCoverStyle: '커버 스타일',
|
||||
coverOptions: {
|
||||
record: '레코드',
|
||||
square: '정사각형',
|
||||
full: '전체화면'
|
||||
},
|
||||
lyricLines: '가사 줄 수',
|
||||
mobileUnavailable: '이 설정은 모바일에서만 사용 가능합니다'
|
||||
},
|
||||
themeColor: {
|
||||
title: '가사 테마 색상',
|
||||
presetColors: '미리 설정된 색상',
|
||||
customColor: '사용자 정의 색상',
|
||||
preview: '미리보기 효과',
|
||||
previewText: '가사 효과',
|
||||
colorNames: {
|
||||
'spotify-green': 'Spotify 그린',
|
||||
'apple-blue': '애플 블루',
|
||||
'youtube-red': 'YouTube 레드',
|
||||
orange: '활력 오렌지',
|
||||
purple: '신비 퍼플',
|
||||
pink: '벚꽃 핑크'
|
||||
},
|
||||
tooltips: {
|
||||
openColorPicker: '색상 선택기 열기',
|
||||
closeColorPicker: '색상 선택기 닫기'
|
||||
},
|
||||
placeholder: '#1db954'
|
||||
},
|
||||
shortcutSettings: {
|
||||
title: '단축키 설정',
|
||||
shortcut: '단축키',
|
||||
shortcutDesc: '단축키 사용자 정의',
|
||||
shortcutConflict: '단축키 충돌',
|
||||
inputPlaceholder: '클릭하여 단축키 입력',
|
||||
resetShortcuts: '기본값 복원',
|
||||
disableAll: '모두 비활성화',
|
||||
enableAll: '모두 활성화',
|
||||
togglePlay: '재생/일시정지',
|
||||
prevPlay: '이전 곡',
|
||||
nextPlay: '다음 곡',
|
||||
volumeUp: '볼륨 증가',
|
||||
volumeDown: '볼륨 감소',
|
||||
toggleFavorite: '즐겨찾기/즐겨찾기 취소',
|
||||
toggleWindow: '창 표시/숨기기',
|
||||
scopeGlobal: '전역',
|
||||
scopeApp: '앱 내',
|
||||
enabled: '활성화',
|
||||
disabled: '비활성화',
|
||||
messages: {
|
||||
resetSuccess: '기본 단축키로 복원되었습니다. 저장을 잊지 마세요',
|
||||
conflict: '충돌하는 단축키가 있습니다. 다시 설정하세요',
|
||||
saveSuccess: '단축키 설정이 저장되었습니다',
|
||||
saveError: '단축키 저장 실패, 다시 시도하세요',
|
||||
cancelEdit: '수정이 취소되었습니다',
|
||||
disableAll: '모든 단축키가 비활성화되었습니다. 저장을 잊지 마세요',
|
||||
enableAll: '모든 단축키가 활성화되었습니다. 저장을 잊지 마세요'
|
||||
}
|
||||
},
|
||||
remoteControl: {
|
||||
title: '원격 제어',
|
||||
enable: '원격 제어 활성화',
|
||||
port: '서비스 포트',
|
||||
allowedIps: '허용된 IP 주소',
|
||||
addIp: 'IP 추가',
|
||||
emptyListHint: '빈 목록은 모든 IP 액세스를 허용함을 의미합니다',
|
||||
saveSuccess: '원격 제어 설정이 저장되었습니다',
|
||||
accessInfo: '원격 제어 액세스 주소:'
|
||||
},
|
||||
cookie: {
|
||||
title: 'Cookie 설정',
|
||||
description: '넷이즈 클라우드 뮤직의 Cookie를 입력하세요:',
|
||||
placeholder: '완전한 Cookie를 붙여넣으세요...',
|
||||
help: {
|
||||
format: 'Cookie는 일반적으로 "MUSIC_U="로 시작합니다',
|
||||
source: '브라우저 개발자 도구의 네트워크 요청에서 얻을 수 있습니다',
|
||||
storage: 'Cookie 설정 후 자동으로 로컬 저장소에 저장됩니다'
|
||||
},
|
||||
action: {
|
||||
save: 'Cookie 저장',
|
||||
paste: '붙여넣기',
|
||||
clear: '지우기'
|
||||
},
|
||||
validation: {
|
||||
required: 'Cookie를 입력하세요',
|
||||
format: 'Cookie 형식이 올바르지 않을 수 있습니다. MUSIC_U가 포함되어 있는지 확인하세요'
|
||||
},
|
||||
message: {
|
||||
saveSuccess: 'Cookie 저장 성공',
|
||||
saveError: 'Cookie 저장 실패',
|
||||
pasteSuccess: '붙여넣기 성공',
|
||||
pasteError: '붙여넣기 실패, 수동으로 복사하세요'
|
||||
},
|
||||
info: {
|
||||
length: '현재 길이: {length} 문자'
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
theme: '테마',
|
||||
language: '언어',
|
||||
regard: '정보',
|
||||
logout: '로그아웃',
|
||||
sections: {
|
||||
basic: '기본 설정',
|
||||
playback: '재생 설정',
|
||||
application: '애플리케이션 설정',
|
||||
network: '네트워크 설정',
|
||||
system: '시스템 관리',
|
||||
donation: '후원 지원',
|
||||
about: '정보'
|
||||
},
|
||||
basic: {
|
||||
themeMode: '테마 모드',
|
||||
themeModeDesc: '낮/밤 테마 전환',
|
||||
autoTheme: '시스템 따라가기',
|
||||
manualTheme: '수동 전환',
|
||||
language: '언어 설정',
|
||||
languageDesc: '표시 언어 전환',
|
||||
tokenManagement: 'Cookie 관리',
|
||||
tokenManagementDesc: '넷이즈 클라우드 뮤직 로그인 Cookie 관리',
|
||||
tokenStatus: '현재 Cookie 상태',
|
||||
tokenSet: '설정됨',
|
||||
tokenNotSet: '설정되지 않음',
|
||||
setToken: 'Cookie 설정',
|
||||
modifyToken: 'Cookie 수정',
|
||||
clearToken: 'Cookie 지우기',
|
||||
font: '폰트 설정',
|
||||
fontDesc: '폰트 선택, 앞에 있는 폰트를 우선 사용',
|
||||
fontScope: {
|
||||
global: '전역',
|
||||
lyric: '가사만'
|
||||
},
|
||||
animation: '애니메이션 속도',
|
||||
animationDesc: '애니메이션 활성화 여부',
|
||||
animationSpeed: {
|
||||
slow: '매우 느림',
|
||||
normal: '보통',
|
||||
fast: '매우 빠름'
|
||||
},
|
||||
fontPreview: {
|
||||
title: '폰트 미리보기',
|
||||
chinese: '中文',
|
||||
english: 'English',
|
||||
japanese: '日本語',
|
||||
korean: '한국어',
|
||||
chineseText: '静夜思 床前明月光 疑是地上霜',
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
},
|
||||
gpuAcceleration: 'GPU 가속',
|
||||
gpuAccelerationDesc:
|
||||
'GPU 가속을 사용하면 애니메이션이 빠르게 재생되고 애니메이션이 느리게 재생되는 것보다 느릴 수 있습니다.',
|
||||
gpuAccelerationRestart: 'GPU 가속 설정을 변경하면 애플리케이션을 다시 시작해야 합니다',
|
||||
gpuAccelerationChangeSuccess:
|
||||
'GPU 가속 설정이 업데이트되었습니다. 애플리케이션을 다시 시작하여 적용하십시오',
|
||||
gpuAccelerationChangeError: 'GPU 가속 설정 업데이트에 실패했습니다',
|
||||
tabletMode: '태블릿 모드',
|
||||
tabletModeDesc:
|
||||
'태블릿 모드를 사용하면 모바일 기기에서 PC 스타일의 인터페이스를 사용할 수 있습니다'
|
||||
},
|
||||
playback: {
|
||||
quality: '음질 설정',
|
||||
qualityDesc: '음악 재생 음질 선택 (넷이즈 클라우드 VIP)',
|
||||
qualityOptions: {
|
||||
standard: '표준',
|
||||
higher: '높음',
|
||||
exhigh: '매우 높음',
|
||||
lossless: '무손실',
|
||||
hires: 'Hi-Res',
|
||||
jyeffect: 'HD 서라운드',
|
||||
sky: '몰입형 서라운드',
|
||||
dolby: '돌비 애트모스',
|
||||
jymaster: '초고화질 마스터'
|
||||
},
|
||||
musicSources: '음원 설정',
|
||||
musicSourcesDesc: '음악 해석에 사용할 음원 플랫폼 선택',
|
||||
musicSourcesWarning: '최소 하나의 음원 플랫폼을 선택해야 합니다',
|
||||
musicUnblockEnable: '음악 해석 활성화',
|
||||
musicUnblockEnableDesc: '활성화하면 재생할 수 없는 음악을 해석하려고 시도합니다',
|
||||
configureMusicSources: '음원 구성',
|
||||
selectedMusicSources: '선택된 음원:',
|
||||
noMusicSources: '음원이 선택되지 않음',
|
||||
gdmusicInfo: 'GD 뮤직은 여러 플랫폼 음원을 자동으로 해석하고 최적의 결과를 자동 선택합니다',
|
||||
autoPlay: '자동 재생',
|
||||
autoPlayDesc: '앱을 다시 열 때 자동으로 재생을 계속할지 여부',
|
||||
showStatusBar: '상태바 제어 기능 표시 여부',
|
||||
showStatusBarContent: 'Mac 상태바에 음악 제어 기능을 표시할 수 있습니다 (재시작 후 적용)',
|
||||
fallbackParser: '대체 분석 서비스 (GD Music)',
|
||||
fallbackParserDesc:
|
||||
'"GD Music"을 선택하고 일반 음원을 사용할 수 없을 때 이 서비스를 사용합니다.',
|
||||
parserGD: 'GD Music (내장)',
|
||||
parserCustom: '사용자 지정 API',
|
||||
|
||||
// 음원 라벨
|
||||
sourceLabels: {
|
||||
migu: 'Migu',
|
||||
kugou: 'Kugou',
|
||||
pyncmd: 'NetEase (내장)',
|
||||
bilibili: 'Bilibili',
|
||||
gdmusic: 'GD Music',
|
||||
custom: '사용자 지정 API'
|
||||
},
|
||||
|
||||
customApi: {
|
||||
sectionTitle: '사용자 지정 API 설정',
|
||||
importConfig: 'JSON 설정 가져오기',
|
||||
currentSource: '현재 음원',
|
||||
notImported: '아직 사용자 지정 음원을 가져오지 않았습니다.',
|
||||
importSuccess: '음원 가져오기 성공: {name}',
|
||||
importFailed: '가져오기 실패: {message}',
|
||||
enableHint: '사용하려면 먼저 JSON 구성 파일을 가져오세요',
|
||||
status: {
|
||||
imported: '사용자 지정 음원 가져옴',
|
||||
notImported: '가져오지 않음'
|
||||
}
|
||||
},
|
||||
lxMusic: {
|
||||
tabs: {
|
||||
sources: '음원 선택',
|
||||
lxMusic: '낙설 음원',
|
||||
customApi: '사용자 정의 API'
|
||||
},
|
||||
scripts: {
|
||||
title: '가져온 스크립트',
|
||||
importLocal: '로컬 가져오기',
|
||||
importOnline: '온라인 가져오기',
|
||||
urlPlaceholder: '낙설 음원 스크립트 URL 입력',
|
||||
importBtn: '가져오기',
|
||||
empty: '가져온 낙설 음원이 없습니다',
|
||||
notConfigured: '설정되지 않음 (낙설 음원 탭에서 설정하세요)',
|
||||
importHint: '소스 확장을 위해 호환되는 사용자 정의 API 플러그인을 가져옵니다',
|
||||
noScriptWarning: '먼저 낙설 음원 스크립트를 가져오세요',
|
||||
noSelectionWarning: '먼저 낙설 음원 소스를 선택하세요',
|
||||
notFound: '음원이 존재하지 않습니다',
|
||||
switched: '음원으로 전환되었습니다: {name}',
|
||||
deleted: '음원이 삭제되었습니다: {name}',
|
||||
enterUrl: '스크립트 URL을 입력하세요',
|
||||
invalidUrl: '유효하지 않은 URL 형식',
|
||||
invalidScript: '유효하지 않은 낙설 음원 스크립트입니다 (globalThis.lx 코드를 찾을 수 없음)',
|
||||
nameRequired: '이름은 비워둘 수 없습니다',
|
||||
renameSuccess: '이름이 변경되었습니다'
|
||||
}
|
||||
}
|
||||
},
|
||||
application: {
|
||||
closeAction: '닫기 동작',
|
||||
closeActionDesc: '창을 닫을 때의 동작 선택',
|
||||
closeOptions: {
|
||||
ask: '매번 묻기',
|
||||
minimize: '트레이로 최소화',
|
||||
close: '직접 종료'
|
||||
},
|
||||
shortcut: '단축키 설정',
|
||||
shortcutDesc: '전역 단축키 사용자 정의',
|
||||
download: '다운로드 관리',
|
||||
downloadDesc: '다운로드 목록 버튼을 항상 표시할지 여부',
|
||||
unlimitedDownload: '무제한 다운로드',
|
||||
unlimitedDownloadDesc:
|
||||
'활성화하면 음악을 무제한으로 다운로드합니다 (다운로드 실패가 발생할 수 있음), 기본 제한 300곡',
|
||||
downloadPath: '다운로드 디렉토리',
|
||||
downloadPathDesc: '음악 파일의 다운로드 위치 선택',
|
||||
remoteControl: '원격 제어',
|
||||
remoteControlDesc: '원격 제어 기능 설정'
|
||||
},
|
||||
network: {
|
||||
apiPort: '음악 API 포트',
|
||||
apiPortDesc: '수정 후 앱을 재시작해야 합니다',
|
||||
proxy: '프록시 설정',
|
||||
proxyDesc: '음악에 액세스할 수 없을 때 프록시를 활성화할 수 있습니다',
|
||||
proxyHost: '프록시 주소',
|
||||
proxyHostPlaceholder: '프록시 주소를 입력하세요',
|
||||
proxyPort: '프록시 포트',
|
||||
proxyPortPlaceholder: '프록시 포트를 입력하세요',
|
||||
realIP: 'realIP 설정',
|
||||
realIPDesc:
|
||||
'제한으로 인해 이 프로젝트는 해외에서 사용할 때 제한을 받을 수 있으며, realIP 매개변수를 사용하여 국내 IP를 전달하여 해결할 수 있습니다',
|
||||
messages: {
|
||||
proxySuccess: '프록시 설정이 저장되었습니다. 앱을 재시작한 후 적용됩니다',
|
||||
proxyError: '입력이 올바른지 확인하세요',
|
||||
realIPSuccess: '실제 IP 설정이 저장되었습니다',
|
||||
realIPError: '유효한 IP 주소를 입력하세요'
|
||||
}
|
||||
},
|
||||
system: {
|
||||
cache: '캐시 관리',
|
||||
cacheDesc: '캐시 지우기',
|
||||
cacheClearTitle: '지울 캐시 유형을 선택하세요:',
|
||||
cacheTypes: {
|
||||
history: {
|
||||
label: '재생 기록',
|
||||
description: '재생한 곡 기록 지우기'
|
||||
},
|
||||
favorite: {
|
||||
label: '즐겨찾기 기록',
|
||||
description: '로컬 즐겨찾기 곡 기록 지우기 (클라우드 즐겨찾기에는 영향 없음)'
|
||||
},
|
||||
user: {
|
||||
label: '사용자 데이터',
|
||||
description: '로그인 정보 및 사용자 관련 데이터 지우기'
|
||||
},
|
||||
settings: {
|
||||
label: '앱 설정',
|
||||
description: '앱의 모든 사용자 정의 설정 지우기'
|
||||
},
|
||||
downloads: {
|
||||
label: '다운로드 기록',
|
||||
description: '다운로드 기록 지우기 (다운로드된 파일은 삭제되지 않음)'
|
||||
},
|
||||
resources: {
|
||||
label: '음악 리소스',
|
||||
description: '로드된 음악 파일, 가사 등 리소스 캐시 지우기'
|
||||
},
|
||||
lyrics: {
|
||||
label: '가사 리소스',
|
||||
description: '로드된 가사 리소스 캐시 지우기'
|
||||
}
|
||||
},
|
||||
restart: '재시작',
|
||||
restartDesc: '앱 재시작',
|
||||
messages: {
|
||||
clearSuccess: '지우기 성공, 일부 설정은 재시작 후 적용됩니다'
|
||||
}
|
||||
},
|
||||
about: {
|
||||
version: '버전',
|
||||
checkUpdate: '업데이트 확인',
|
||||
checking: '확인 중...',
|
||||
latest: '현재 최신 버전입니다',
|
||||
hasUpdate: '새 버전 발견',
|
||||
gotoUpdate: '업데이트하러 가기',
|
||||
gotoGithub: 'Github로 이동',
|
||||
author: '작성자',
|
||||
authorDesc: 'algerkong 별점🌟 부탁드려요',
|
||||
messages: {
|
||||
checkError: '업데이트 확인 실패, 나중에 다시 시도하세요'
|
||||
}
|
||||
},
|
||||
validation: {
|
||||
selectProxyProtocol: '프록시 프로토콜을 선택하세요',
|
||||
proxyHost: '프록시 주소를 입력하세요',
|
||||
portNumber: '유효한 포트 번호를 입력하세요 (1-65535)'
|
||||
},
|
||||
lyricSettings: {
|
||||
title: '가사 설정',
|
||||
tabs: {
|
||||
display: '표시',
|
||||
interface: '인터페이스',
|
||||
typography: '텍스트',
|
||||
background: '배경',
|
||||
mobile: '모바일'
|
||||
},
|
||||
pureMode: '순수 모드',
|
||||
hideCover: '커버 숨기기',
|
||||
centerDisplay: '중앙 표시',
|
||||
showTranslation: '번역 표시',
|
||||
hideLyrics: '가사 숨기기',
|
||||
hidePlayBar: '재생바 숨기기',
|
||||
hideMiniPlayBar: '미니 재생바 숨기기',
|
||||
showMiniPlayBar: '미니 재생바 표시',
|
||||
backgroundTheme: '배경 테마',
|
||||
themeOptions: {
|
||||
default: '기본',
|
||||
light: '밝음',
|
||||
dark: '어둠'
|
||||
},
|
||||
fontSize: '폰트 크기',
|
||||
fontSizeMarks: {
|
||||
small: '작음',
|
||||
medium: '중간',
|
||||
large: '큼'
|
||||
},
|
||||
fontWeight: '글꼴 두께',
|
||||
fontWeightMarks: {
|
||||
thin: '가늘게',
|
||||
normal: '보통',
|
||||
bold: '굵게'
|
||||
},
|
||||
letterSpacing: '글자 간격',
|
||||
letterSpacingMarks: {
|
||||
compact: '좁음',
|
||||
default: '기본',
|
||||
loose: '넓음'
|
||||
},
|
||||
lineHeight: '줄 높이',
|
||||
lineHeightMarks: {
|
||||
compact: '좁음',
|
||||
default: '기본',
|
||||
loose: '넓음'
|
||||
},
|
||||
contentWidth: '콘텐츠 너비',
|
||||
mobileLayout: '모바일 레이아웃',
|
||||
layoutOptions: {
|
||||
default: '기본',
|
||||
ios: 'iOS 스타일',
|
||||
android: '안드로이드 스타일'
|
||||
},
|
||||
mobileCoverStyle: '커버 스타일',
|
||||
coverOptions: {
|
||||
record: '레코드',
|
||||
square: '정사각형',
|
||||
full: '전체화면'
|
||||
},
|
||||
lyricLines: '가사 줄 수',
|
||||
mobileUnavailable: '이 설정은 모바일에서만 사용 가능합니다',
|
||||
// 배경 설정
|
||||
background: {
|
||||
useCustomBackground: '사용자 정의 배경 사용',
|
||||
backgroundMode: '배경 모드',
|
||||
modeOptions: {
|
||||
solid: '단색',
|
||||
gradient: '그라데이션',
|
||||
image: '이미지',
|
||||
css: 'CSS'
|
||||
},
|
||||
solidColor: '색상 선택',
|
||||
presetColors: '프리셋 색상',
|
||||
customColor: '사용자 정의 색상',
|
||||
gradientEditor: '그라데이션 편집기',
|
||||
gradientColors: '그라데이션 색상',
|
||||
gradientDirection: '그라데이션 방향',
|
||||
directionOptions: {
|
||||
toBottom: '위에서 아래로',
|
||||
toRight: '왼쪽에서 오른쪽으로',
|
||||
toBottomRight: '왼쪽 위에서 오른쪽 아래로',
|
||||
angle45: '45도',
|
||||
toTop: '아래에서 위로',
|
||||
toLeft: '오른쪽에서 왼쪽으로'
|
||||
},
|
||||
addColor: '색상 추가',
|
||||
removeColor: '색상 제거',
|
||||
imageUpload: '이미지 업로드',
|
||||
imagePreview: '이미지 미리보기',
|
||||
clearImage: '이미지 지우기',
|
||||
imageBlur: '흐림',
|
||||
imageBrightness: '밝기',
|
||||
customCss: '사용자 정의 CSS 스타일',
|
||||
customCssPlaceholder: 'CSS 스타일 입력, 예: background: linear-gradient(...)',
|
||||
customCssHelp: '모든 CSS background 속성 지원',
|
||||
reset: '기본값으로 재설정',
|
||||
fileSizeLimit: '이미지 크기 제한: 20MB',
|
||||
invalidImageFormat: '잘못된 이미지 형식',
|
||||
imageTooLarge: '이미지가 너무 큽니다. 20MB 미만의 이미지를 선택하세요'
|
||||
}
|
||||
},
|
||||
translationEngine: '가사 번역 엔진',
|
||||
translationEngineOptions: {
|
||||
none: '닫기',
|
||||
opencc: 'OpenCC 중국어 번체'
|
||||
},
|
||||
themeColor: {
|
||||
title: '가사 테마 색상',
|
||||
presetColors: '미리 설정된 색상',
|
||||
customColor: '사용자 정의 색상',
|
||||
preview: '미리보기 효과',
|
||||
previewText: '가사 효과',
|
||||
colorNames: {
|
||||
'spotify-green': 'Spotify 그린',
|
||||
'apple-blue': '애플 블루',
|
||||
'youtube-red': 'YouTube 레드',
|
||||
orange: '활력 오렌지',
|
||||
purple: '신비 퍼플',
|
||||
pink: '벚꽃 핑크'
|
||||
},
|
||||
tooltips: {
|
||||
openColorPicker: '색상 선택기 열기',
|
||||
closeColorPicker: '색상 선택기 닫기'
|
||||
},
|
||||
placeholder: '#1db954'
|
||||
},
|
||||
shortcutSettings: {
|
||||
title: '단축키 설정',
|
||||
shortcut: '단축키',
|
||||
shortcutDesc: '단축키 사용자 정의',
|
||||
shortcutConflict: '단축키 충돌',
|
||||
inputPlaceholder: '클릭하여 단축키 입력',
|
||||
resetShortcuts: '기본값 복원',
|
||||
disableAll: '모두 비활성화',
|
||||
enableAll: '모두 활성화',
|
||||
togglePlay: '재생/일시정지',
|
||||
prevPlay: '이전 곡',
|
||||
nextPlay: '다음 곡',
|
||||
volumeUp: '볼륨 증가',
|
||||
volumeDown: '볼륨 감소',
|
||||
toggleFavorite: '즐겨찾기/즐겨찾기 취소',
|
||||
toggleWindow: '창 표시/숨기기',
|
||||
scopeGlobal: '전역',
|
||||
scopeApp: '앱 내',
|
||||
enabled: '활성화',
|
||||
disabled: '비활성화',
|
||||
messages: {
|
||||
resetSuccess: '기본 단축키로 복원되었습니다. 저장을 잊지 마세요',
|
||||
conflict: '충돌하는 단축키가 있습니다. 다시 설정하세요',
|
||||
saveSuccess: '단축키 설정이 저장되었습니다',
|
||||
saveError: '단축키 저장 실패, 다시 시도하세요',
|
||||
cancelEdit: '수정이 취소되었습니다',
|
||||
disableAll: '모든 단축키가 비활성화되었습니다. 저장을 잊지 마세요',
|
||||
enableAll: '모든 단축키가 활성화되었습니다. 저장을 잊지 마세요'
|
||||
}
|
||||
},
|
||||
remoteControl: {
|
||||
title: '원격 제어',
|
||||
enable: '원격 제어 활성화',
|
||||
port: '서비스 포트',
|
||||
allowedIps: '허용된 IP 주소',
|
||||
addIp: 'IP 추가',
|
||||
emptyListHint: '빈 목록은 모든 IP 액세스를 허용함을 의미합니다',
|
||||
saveSuccess: '원격 제어 설정이 저장되었습니다',
|
||||
accessInfo: '원격 제어 액세스 주소:'
|
||||
},
|
||||
cookie: {
|
||||
title: 'Cookie 설정',
|
||||
description: '넷이즈 클라우드 뮤직의 Cookie를 입력하세요:',
|
||||
placeholder: '완전한 Cookie를 붙여넣으세요...',
|
||||
help: {
|
||||
format: 'Cookie는 일반적으로 "MUSIC_U="로 시작합니다',
|
||||
source: '브라우저 개발자 도구의 네트워크 요청에서 얻을 수 있습니다',
|
||||
storage: 'Cookie 설정 후 자동으로 로컬 저장소에 저장됩니다'
|
||||
},
|
||||
action: {
|
||||
save: 'Cookie 저장',
|
||||
paste: '붙여넣기',
|
||||
clear: '지우기'
|
||||
},
|
||||
validation: {
|
||||
required: 'Cookie를 입력하세요',
|
||||
format: 'Cookie 형식이 올바르지 않을 수 있습니다. MUSIC_U가 포함되어 있는지 확인하세요'
|
||||
},
|
||||
message: {
|
||||
saveSuccess: 'Cookie 저장 성공',
|
||||
saveError: 'Cookie 저장 실패',
|
||||
pasteSuccess: '붙여넣기 성공',
|
||||
pasteError: '붙여넣기 실패, 수동으로 복사하세요'
|
||||
},
|
||||
info: {
|
||||
length: '현재 길이: {length} 문자'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -25,4 +25,4 @@ export default {
|
||||
negativeText: '취소'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,6 +10,11 @@ export default {
|
||||
trackCount: '{count}곡',
|
||||
playCount: '{count}회 재생'
|
||||
},
|
||||
tabs: {
|
||||
created: '생성',
|
||||
favorite: '즐겨찾기',
|
||||
album: '앨범'
|
||||
},
|
||||
ranking: {
|
||||
title: '음악 청취 순위',
|
||||
playCount: '{count}회'
|
||||
@@ -45,4 +50,4 @@ export default {
|
||||
deleteSuccess: '삭제 성공',
|
||||
deleteFailed: '삭제 실패'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
51
src/i18n/lang/zh-CN/bilibili.ts
Normal file
51
src/i18n/lang/zh-CN/bilibili.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export default {
|
||||
player: {
|
||||
loading: '听书加载中...',
|
||||
retry: '重试',
|
||||
playNow: '立即播放',
|
||||
loadingTitle: '加载中...',
|
||||
totalDuration: '总时长: {duration}',
|
||||
partsList: '分P列表 (共{count}集)',
|
||||
playStarted: '已开始播放',
|
||||
switchingPart: '切换到分P: {part}',
|
||||
preloadingNext: '预加载下一个分P: {part}',
|
||||
playingCurrent: '播放当前选中的分P: {name}',
|
||||
num: '万',
|
||||
errors: {
|
||||
invalidVideoId: '视频ID无效',
|
||||
loadVideoDetailFailed: '获取视频详情失败',
|
||||
loadPartInfoFailed: '无法加载视频分P信息',
|
||||
loadAudioUrlFailed: '获取音频播放地址失败',
|
||||
videoDetailNotLoaded: '视频详情未加载',
|
||||
missingParams: '缺少必要参数',
|
||||
noAvailableAudioUrl: '未找到可用的音频地址',
|
||||
loadPartAudioFailed: '加载分P音频URL失败',
|
||||
audioListEmpty: '音频列表为空,请重试',
|
||||
currentPartNotFound: '未找到当前分P的音频',
|
||||
audioUrlFailed: '获取音频URL失败',
|
||||
playFailed: '播放失败,请重试',
|
||||
getAudioUrlFailed: '获取音频地址失败,请重试',
|
||||
audioNotFound: '未找到对应的音频,请重试',
|
||||
preloadFailed: '预加载下一个分P失败',
|
||||
switchPartFailed: '切换分P时加载音频URL失败'
|
||||
},
|
||||
console: {
|
||||
loadingDetail: '加载B站视频详情',
|
||||
detailData: 'B站视频详情数据',
|
||||
multipleParts: '视频有多个分P,共{count}个',
|
||||
noPartsData: '视频无分P或分P数据为空',
|
||||
loadingAudioSource: '加载音频源',
|
||||
generatedAudioList: '已生成音频列表,共{count}首',
|
||||
getDashAudioUrl: '获取到dash音频URL',
|
||||
getDurlAudioUrl: '获取到durl音频URL',
|
||||
loadingPartAudio: '加载分P音频URL: {part}, cid: {cid}',
|
||||
loadPartAudioFailed: '加载分P音频URL失败: {part}',
|
||||
switchToPart: '切换到分P: {part}',
|
||||
audioNotFoundInList: '未找到对应的音频项',
|
||||
preparingToPlay: '准备播放当前选中的分P: {name}',
|
||||
preloadingNextPart: '预加载下一个分P: {part}',
|
||||
playingSelectedPart: '播放当前选中的分P: {name},音频URL: {url}',
|
||||
preloadNextFailed: '预加载下一个分P失败'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -43,6 +43,8 @@ export default {
|
||||
collapse: '收起',
|
||||
songCount: '{count}首',
|
||||
language: '语言',
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
tray: {
|
||||
show: '显示',
|
||||
quit: '退出',
|
||||
|
||||
@@ -50,6 +50,27 @@ export default {
|
||||
copyFailed: '复制失败',
|
||||
backgroundDownload: '后台下载'
|
||||
},
|
||||
disclaimer: {
|
||||
title: '使用须知',
|
||||
warning: '本应用为开发测试版本,功能尚不完善,可能存在较多问题和 Bug,仅供学习交流使用。',
|
||||
item1: '本应用仅供个人学习、研究和技术交流使用,请勿用于任何商业用途。',
|
||||
item2: '请在下载后 24 小时内删除,如需长期使用请支持正版音乐服务。',
|
||||
item3: '使用本应用即表示您理解并承担相关风险,开发者不对任何损失负责。',
|
||||
agree: '我已阅读并同意',
|
||||
disagree: '不同意并退出'
|
||||
},
|
||||
donate: {
|
||||
title: '支持开发者',
|
||||
subtitle: '您的支持是我前进的动力',
|
||||
tip: '捐赠完全自愿,不捐赠也可以正常使用所有功能,感谢您的理解与支持!',
|
||||
wechat: '微信',
|
||||
alipay: '支付宝',
|
||||
wechatQR: '微信收款码',
|
||||
alipayQR: '支付宝收款码',
|
||||
scanTip: '请使用手机扫描上方二维码进行捐赠',
|
||||
enterApp: '进入应用',
|
||||
noForce: '不强制捐赠,点击即可进入'
|
||||
},
|
||||
coffee: {
|
||||
title: '请我喝咖啡',
|
||||
alipay: '支付宝',
|
||||
@@ -117,7 +138,11 @@ export default {
|
||||
cancelCollect: '取消收藏',
|
||||
addToPlaylist: '添加到播放列表',
|
||||
addToPlaylistSuccess: '添加到播放列表成功',
|
||||
songsAlreadyInPlaylist: '歌曲已存在于播放列表中'
|
||||
songsAlreadyInPlaylist: '歌曲已存在于播放列表中',
|
||||
historyRecommend: '历史日推',
|
||||
fetchDatesFailed: '获取日期列表失败',
|
||||
fetchSongsFailed: '获取歌曲列表失败',
|
||||
noSongs: '暂无歌曲'
|
||||
},
|
||||
playlist: {
|
||||
import: {
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
export default {
|
||||
title: '播放历史',
|
||||
heatmapTitle: '热力图',
|
||||
playCount: '{count}',
|
||||
getHistoryFailed: '获取历史记录失败'
|
||||
getHistoryFailed: '获取历史记录失败',
|
||||
categoryTabs: {
|
||||
songs: '歌曲',
|
||||
playlists: '歌单',
|
||||
albums: '专辑'
|
||||
},
|
||||
tabs: {
|
||||
all: '全部记录',
|
||||
local: '本地记录',
|
||||
cloud: '云端记录'
|
||||
},
|
||||
getCloudRecordFailed: '获取云端记录失败',
|
||||
needLogin: '请使用cookie登录以查看云端记录',
|
||||
merging: '正在合并记录...',
|
||||
noDescription: '暂无描述',
|
||||
noData: '暂无记录',
|
||||
heatmap: {
|
||||
title: '播放热力图',
|
||||
loading: '正在加载数据...',
|
||||
unit: '次播放',
|
||||
footerText: '鼠标悬停查看详细信息',
|
||||
playCount: '播放 {count} 次',
|
||||
topSongs: '当天热门歌曲',
|
||||
times: '次',
|
||||
totalPlays: '总播放次数',
|
||||
activeDays: '活跃天数',
|
||||
noData: '暂无播放记录',
|
||||
colorTheme: '配色方案',
|
||||
colors: {
|
||||
green: '绿色',
|
||||
blue: '蓝色',
|
||||
orange: '橙色',
|
||||
purple: '紫色',
|
||||
red: '红色'
|
||||
},
|
||||
mostPlayedSong: '播放最多的歌曲',
|
||||
mostActiveDay: '最活跃的一天',
|
||||
latestNightSong: '最晚播放的歌曲'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,6 +14,8 @@ export default {
|
||||
addCorrection: '提前 {num} 秒',
|
||||
subtractCorrection: '延迟 {num} 秒',
|
||||
playFailed: '当前歌曲播放失败,播放下一首',
|
||||
parseFailedPlayNext: '歌曲解析失败,播放下一首',
|
||||
consecutiveFailsError: '播放遇到错误,可能是网络波动或解析源失效,请切换播放列表或稍后重试',
|
||||
playMode: {
|
||||
sequence: '顺序播放',
|
||||
loop: '单曲循环',
|
||||
@@ -29,7 +31,8 @@ export default {
|
||||
list: '自动播放下一个'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '暂无歌词, 请欣赏'
|
||||
noLrc: '暂无歌词, 请欣赏',
|
||||
noAutoScroll: '本歌词不支持自动滚动'
|
||||
},
|
||||
reparse: {
|
||||
title: '选择解析音源',
|
||||
@@ -39,7 +42,9 @@ export default {
|
||||
warning: '请选择一个音源',
|
||||
bilibiliNotSupported: 'B站视频不支持重新解析',
|
||||
processing: '解析中...',
|
||||
clear: '清除自定义音源'
|
||||
clear: '清除自定义音源',
|
||||
customApiFailed: '自定义API解析失败,正在尝试使用内置音源...',
|
||||
customApiError: '自定义API请求出错,正在尝试使用内置音源...'
|
||||
},
|
||||
playBar: {
|
||||
expand: '展开歌词',
|
||||
@@ -64,7 +69,17 @@ export default {
|
||||
unFavorite: '已取消收藏{name}',
|
||||
miniPlayBar: '迷你播放栏',
|
||||
playbackSpeed: '播放速度',
|
||||
advancedControls: '更多设置s'
|
||||
advancedControls: '更多设置',
|
||||
intelligenceMode: {
|
||||
title: '心动模式',
|
||||
needCookieLogin: '请使用 Cookie 方式登录后使用心动模式',
|
||||
noFavoritePlaylist: '未找到我喜欢的音乐歌单',
|
||||
noLikedSongs: '您还没有喜欢的歌曲',
|
||||
loading: '正在加载心动模式',
|
||||
success: '已加载 {count} 首歌曲',
|
||||
failed: '获取心动模式列表失败',
|
||||
error: '心动模式播放出错'
|
||||
}
|
||||
},
|
||||
eq: {
|
||||
title: '均衡器',
|
||||
@@ -90,6 +105,11 @@ export default {
|
||||
custom: '自定义'
|
||||
}
|
||||
},
|
||||
// 播放器设置
|
||||
settings: {
|
||||
title: '播放设置',
|
||||
playbackSpeed: '播放速度'
|
||||
},
|
||||
// 定时关闭功能相关
|
||||
sleepTimer: {
|
||||
title: '定时关闭',
|
||||
|
||||
@@ -11,7 +11,8 @@ export default {
|
||||
},
|
||||
loading: {
|
||||
more: '加载中...',
|
||||
failed: '搜索失败'
|
||||
failed: '搜索失败',
|
||||
searching: '搜索中...'
|
||||
},
|
||||
noMore: '没有更多了',
|
||||
error: {
|
||||
@@ -23,5 +24,8 @@ export default {
|
||||
playlist: '歌单',
|
||||
mv: 'MV',
|
||||
bilibili: 'B站'
|
||||
}
|
||||
},
|
||||
history: '搜索历史',
|
||||
hot: '热门搜索',
|
||||
suggestions: '搜索建议'
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
network: '网络设置',
|
||||
system: '系统管理',
|
||||
donation: '捐赠支持',
|
||||
regard: '关于'
|
||||
about: '关于'
|
||||
},
|
||||
basic: {
|
||||
themeMode: '主题模式',
|
||||
@@ -50,7 +50,14 @@ export default {
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
}
|
||||
},
|
||||
gpuAcceleration: 'GPU加速',
|
||||
gpuAccelerationDesc: '启用或禁用硬件加速,可以提高渲染性能但可能会增加GPU负载',
|
||||
gpuAccelerationRestart: '更改GPU加速设置需要重启应用后生效',
|
||||
gpuAccelerationChangeSuccess: 'GPU加速设置已更新,重启应用后生效',
|
||||
gpuAccelerationChangeError: 'GPU加速设置更新失败',
|
||||
tabletMode: '平板模式',
|
||||
tabletModeDesc: '启用后将在移动设备上使用PC样式界面,适合平板等大屏设备'
|
||||
},
|
||||
playback: {
|
||||
quality: '音质设置',
|
||||
@@ -78,7 +85,65 @@ export default {
|
||||
autoPlay: '自动播放',
|
||||
autoPlayDesc: '重新打开应用时是否自动继续播放',
|
||||
showStatusBar: '是否显示状态栏控制功能',
|
||||
showStatusBarContent: '可以在您的mac状态栏显示音乐控制功能(重启后生效)'
|
||||
showStatusBarContent: '可以在您的mac状态栏显示音乐控制功能(重启后生效)',
|
||||
|
||||
fallbackParser: 'GD音乐台(music.gdstudio.xyz)设置',
|
||||
fallbackParserDesc:
|
||||
'GD音乐台将自动尝试多个音乐平台进行解析,无需额外配置。优先级高于其他解析方式,但是请求可能较慢。感谢(music.gdstudio.xyz)\n',
|
||||
parserGD: 'GD 音乐台 (内置)',
|
||||
parserCustom: '自定义 API',
|
||||
|
||||
// 音源标签
|
||||
sourceLabels: {
|
||||
migu: '咪咕音乐',
|
||||
kugou: '酷狗音乐',
|
||||
pyncmd: '网易云(内置)',
|
||||
bilibili: 'Bilibili',
|
||||
gdmusic: 'GD音乐台',
|
||||
custom: '自定义 API'
|
||||
},
|
||||
|
||||
// 自定义API相关的提示
|
||||
customApi: {
|
||||
sectionTitle: '自定义 API 设置',
|
||||
importConfig: '导入 JSON 配置',
|
||||
currentSource: '当前音源',
|
||||
notImported: '尚未导入自定义音源。',
|
||||
importSuccess: '成功导入音源: {name}',
|
||||
importFailed: '导入失败: {message}',
|
||||
enableHint: '请先导入 JSON 配置文件才能启用',
|
||||
status: {
|
||||
imported: '已导入自定义音源',
|
||||
notImported: '未导入'
|
||||
}
|
||||
},
|
||||
lxMusic: {
|
||||
tabs: {
|
||||
sources: '音源选择',
|
||||
lxMusic: '落雪音源',
|
||||
customApi: '自定义API'
|
||||
},
|
||||
scripts: {
|
||||
title: '已导入的音源脚本',
|
||||
importLocal: '本地导入',
|
||||
importOnline: '在线导入',
|
||||
urlPlaceholder: '输入落雪音源脚本 URL',
|
||||
importBtn: '导入',
|
||||
empty: '暂无已导入的落雪音源',
|
||||
notConfigured: '未配置 (请去落雪音源Tab配置)',
|
||||
importHint: '导入兼容的自定义 API 插件以扩展音源',
|
||||
noScriptWarning: '请先导入落雪音源脚本',
|
||||
noSelectionWarning: '请先选择一个落雪音源',
|
||||
notFound: '音源不存在',
|
||||
switched: '已切换到音源: {name}',
|
||||
deleted: '已删除音源: {name}',
|
||||
enterUrl: '请输入脚本 URL',
|
||||
invalidUrl: '无效的 URL 格式',
|
||||
invalidScript: '无效的落雪音源脚本,未找到 globalThis.lx 相关代码',
|
||||
nameRequired: '名称不能为空',
|
||||
renameSuccess: '重命名成功'
|
||||
}
|
||||
}
|
||||
},
|
||||
application: {
|
||||
closeAction: '关闭行为',
|
||||
@@ -182,6 +247,7 @@ export default {
|
||||
display: '显示',
|
||||
interface: '界面',
|
||||
typography: '文字',
|
||||
background: '背景',
|
||||
mobile: '移动端'
|
||||
},
|
||||
pureMode: '纯净模式',
|
||||
@@ -204,6 +270,12 @@ export default {
|
||||
medium: '中',
|
||||
large: '大'
|
||||
},
|
||||
fontWeight: '字体粗细',
|
||||
fontWeightMarks: {
|
||||
thin: '细',
|
||||
normal: '常规',
|
||||
bold: '粗'
|
||||
},
|
||||
letterSpacing: '字间距',
|
||||
letterSpacingMarks: {
|
||||
compact: '紧凑',
|
||||
@@ -216,6 +288,7 @@ export default {
|
||||
default: '默认',
|
||||
loose: '宽松'
|
||||
},
|
||||
contentWidth: '内容区宽度',
|
||||
mobileLayout: '移动端布局',
|
||||
layoutOptions: {
|
||||
default: '默认',
|
||||
@@ -229,7 +302,51 @@ export default {
|
||||
full: '全屏'
|
||||
},
|
||||
lyricLines: '歌词行数',
|
||||
mobileUnavailable: '此设置仅在移动端可用'
|
||||
mobileUnavailable: '此设置仅在移动端可用',
|
||||
// 背景设置
|
||||
background: {
|
||||
useCustomBackground: '使用自定义背景',
|
||||
backgroundMode: '背景模式',
|
||||
modeOptions: {
|
||||
solid: '纯色',
|
||||
gradient: '渐变',
|
||||
image: '图片',
|
||||
css: 'CSS'
|
||||
},
|
||||
solidColor: '选择颜色',
|
||||
presetColors: '预设颜色',
|
||||
customColor: '自定义颜色',
|
||||
gradientEditor: '渐变编辑器',
|
||||
gradientColors: '渐变颜色',
|
||||
gradientDirection: '渐变方向',
|
||||
directionOptions: {
|
||||
toBottom: '上到下',
|
||||
toRight: '左到右',
|
||||
toBottomRight: '左上到右下',
|
||||
angle45: '45度',
|
||||
toTop: '下到上',
|
||||
toLeft: '右到左'
|
||||
},
|
||||
addColor: '添加颜色',
|
||||
removeColor: '移除颜色',
|
||||
imageUpload: '上传图片',
|
||||
imagePreview: '图片预览',
|
||||
clearImage: '清除图片',
|
||||
imageBlur: '模糊度',
|
||||
imageBrightness: '明暗度',
|
||||
customCss: '自定义 CSS 样式',
|
||||
customCssPlaceholder: '输入 CSS 样式,如: background: linear-gradient(...)',
|
||||
customCssHelp: '支持任意 CSS background 属性',
|
||||
reset: '重置为默认',
|
||||
fileSizeLimit: '图片大小限制: 20MB',
|
||||
invalidImageFormat: '无效的图片格式',
|
||||
imageTooLarge: '图片过大,请选择小于 20MB 的图片'
|
||||
}
|
||||
},
|
||||
translationEngine: '歌詞翻譯引擎',
|
||||
translationEngineOptions: {
|
||||
none: '关闭',
|
||||
opencc: 'OpenCC 繁化'
|
||||
},
|
||||
themeColor: {
|
||||
title: '歌词主题色',
|
||||
|
||||
@@ -10,6 +10,11 @@ export default {
|
||||
trackCount: '{count}首',
|
||||
playCount: '播放{count}次'
|
||||
},
|
||||
tabs: {
|
||||
created: '创建',
|
||||
favorite: '收藏',
|
||||
album: '专辑'
|
||||
},
|
||||
ranking: {
|
||||
title: '听歌排行',
|
||||
playCount: '{count}次'
|
||||
|
||||
51
src/i18n/lang/zh-Hant/bilibili.ts
Normal file
51
src/i18n/lang/zh-Hant/bilibili.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export default {
|
||||
player: {
|
||||
loading: '聽書載入中...',
|
||||
retry: '重試',
|
||||
playNow: '立即播放',
|
||||
loadingTitle: '載入中...',
|
||||
totalDuration: '總時長: {duration}',
|
||||
partsList: '分P列表 (共{count}集)',
|
||||
playStarted: '已開始播放',
|
||||
switchingPart: '切換到分P: {part}',
|
||||
preloadingNext: '預載入下一個分P: {part}',
|
||||
playingCurrent: '播放當前選中的分P: {name}',
|
||||
num: '萬',
|
||||
errors: {
|
||||
invalidVideoId: '影片ID無效',
|
||||
loadVideoDetailFailed: '獲取影片詳情失敗',
|
||||
loadPartInfoFailed: '無法載入影片分P資訊',
|
||||
loadAudioUrlFailed: '獲取音訊播放地址失敗',
|
||||
videoDetailNotLoaded: '影片詳情未載入',
|
||||
missingParams: '缺少必要參數',
|
||||
noAvailableAudioUrl: '未找到可用的音訊地址',
|
||||
loadPartAudioFailed: '載入分P音訊URL失敗',
|
||||
audioListEmpty: '音訊列表為空,請重試',
|
||||
currentPartNotFound: '未找到當前分P的音訊',
|
||||
audioUrlFailed: '獲取音訊URL失敗',
|
||||
playFailed: '播放失敗,請重試',
|
||||
getAudioUrlFailed: '獲取音訊地址失敗,請重試',
|
||||
audioNotFound: '未找到對應的音訊,請重試',
|
||||
preloadFailed: '預載入下一個分P失敗',
|
||||
switchPartFailed: '切換分P時載入音訊URL失敗'
|
||||
},
|
||||
console: {
|
||||
loadingDetail: '載入B站影片詳情',
|
||||
detailData: 'B站影片詳情資料',
|
||||
multipleParts: '影片有多個分P,共{count}個',
|
||||
noPartsData: '影片無分P或分P資料為空',
|
||||
loadingAudioSource: '載入音訊來源',
|
||||
generatedAudioList: '已生成音訊列表,共{count}首',
|
||||
getDashAudioUrl: '獲取到dash音訊URL',
|
||||
getDurlAudioUrl: '獲取到durl音訊URL',
|
||||
loadingPartAudio: '載入分P音訊URL: {part}, cid: {cid}',
|
||||
loadPartAudioFailed: '載入分P音訊URL失敗: {part}',
|
||||
switchToPart: '切換到分P: {part}',
|
||||
audioNotFoundInList: '未找到對應的音訊項目',
|
||||
preparingToPlay: '準備播放當前選中的分P: {name}',
|
||||
preloadingNextPart: '預載入下一個分P: {part}',
|
||||
playingSelectedPart: '播放當前選中的分P: {name},音訊URL: {url}',
|
||||
preloadNextFailed: '預載入下一個分P失敗'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -43,6 +43,8 @@ export default {
|
||||
collapse: '收合',
|
||||
songCount: '{count}首',
|
||||
language: '語言',
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
tray: {
|
||||
show: '顯示',
|
||||
quit: '退出',
|
||||
|
||||
@@ -50,6 +50,27 @@ export default {
|
||||
copyFailed: '複製失敗',
|
||||
backgroundDownload: '背景下載'
|
||||
},
|
||||
disclaimer: {
|
||||
title: '使用說明',
|
||||
warning: '本程式為開發測試版本,功能尚未完善,可能存在諸多問題及臭蟲,僅供學習交流使用。',
|
||||
item1: '本程式僅供個人學習、研究及技術交流之目的,不得用於任何商業用途。',
|
||||
item2: '請在下載後 24 小時內刪除,若對您有所幫助,請支持正版音樂。',
|
||||
item3: '使用本程式即代表您已了解並同意相關風險,開發者對任何損失概不負責。',
|
||||
agree: '我已了解並同意',
|
||||
disagree: '不同意並退出'
|
||||
},
|
||||
donate: {
|
||||
title: '支援開發者',
|
||||
subtitle: '您的支援是我持續更新的動力',
|
||||
tip: '捐贈完全採自願原則。即使不捐贈,您依然可以正常使用所有功能。感謝您的理解與支援!',
|
||||
wechat: '微信支付',
|
||||
alipay: '支付寶',
|
||||
wechatQR: '微信收款碼',
|
||||
alipayQR: '支付寶收款碼',
|
||||
scanTip: '請使用手機 App 掃描 QR Code 進行捐贈',
|
||||
enterApp: '進入程式',
|
||||
noForce: '捐贈並非強制,您可以點擊按鈕直接進入'
|
||||
},
|
||||
coffee: {
|
||||
title: '請我喝杯咖啡',
|
||||
alipay: '支付寶',
|
||||
@@ -117,7 +138,11 @@ export default {
|
||||
cancelCollect: '取消收藏',
|
||||
addToPlaylist: '新增至播放清單',
|
||||
addToPlaylistSuccess: '新增至播放清單成功',
|
||||
songsAlreadyInPlaylist: '歌曲已存在於播放清單中'
|
||||
songsAlreadyInPlaylist: '歌曲已存在於播放清單中',
|
||||
historyRecommend: '歷史日推',
|
||||
fetchDatesFailed: '獲取日期列表失敗',
|
||||
fetchSongsFailed: '獲取歌曲列表失敗',
|
||||
noSongs: '暫無歌曲'
|
||||
},
|
||||
playlist: {
|
||||
import: {
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
export default {
|
||||
title: '播放歷史',
|
||||
heatmapTitle: '熱力圖',
|
||||
playCount: '{count}',
|
||||
getHistoryFailed: '取得歷史記錄失敗'
|
||||
getHistoryFailed: '取得歷史記錄失敗',
|
||||
categoryTabs: {
|
||||
songs: '歌曲',
|
||||
playlists: '歌單',
|
||||
albums: '專輯'
|
||||
},
|
||||
tabs: {
|
||||
all: '全部記錄',
|
||||
local: '本地記錄',
|
||||
cloud: '雲端記錄'
|
||||
},
|
||||
getCloudRecordFailed: '取得雲端記錄失敗',
|
||||
needLogin: '請使用cookie登入以查看雲端記錄',
|
||||
merging: '正在合併記錄...',
|
||||
noDescription: '暫無描述',
|
||||
noData: '暫無記錄',
|
||||
heatmap: {
|
||||
title: '播放熱力圖',
|
||||
loading: '正在載入數據...',
|
||||
unit: '次播放',
|
||||
footerText: '滑鼠懸停查看詳細信息',
|
||||
playCount: '播放 {count} 次',
|
||||
topSongs: '當天熱門歌曲',
|
||||
times: '次',
|
||||
totalPlays: '總播放次數',
|
||||
activeDays: '活躍天數',
|
||||
noData: '暫無播放記錄',
|
||||
colorTheme: '配色方案',
|
||||
colors: {
|
||||
green: '綠色',
|
||||
blue: '藍色',
|
||||
orange: '橙色',
|
||||
purple: '紫色',
|
||||
red: '紅色'
|
||||
},
|
||||
mostPlayedSong: '播放最多的歌曲',
|
||||
mostActiveDay: '最活躍的一天',
|
||||
latestNightSong: '最晚播放的歌曲'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,7 +41,21 @@ export default {
|
||||
uidLoginFailed: 'UID登入失敗,請檢查使用者ID是否正確',
|
||||
autoGetCookieSuccess: '自動取得Cookie成功',
|
||||
autoGetCookieFailed: '自動取得Cookie失敗',
|
||||
autoGetCookieTip: '將開啟網易雲音樂登入頁面,請完成登入後關閉視窗'
|
||||
autoGetCookieTip: '將開啟網易雲音樂登入頁面,請完成登入後關閉視窗',
|
||||
loginFailed: '登入失敗',
|
||||
phoneRequired: '請輸入手機號',
|
||||
passwordRequired: '請輸入密碼',
|
||||
phoneLoginFailed: '手機號登入失敗,請檢查手機號和密碼是否正確',
|
||||
qrCheckFailed: '檢查二維碼狀態失敗,請刷新重試',
|
||||
qrLoading: '正在載入二維碼...',
|
||||
qrExpired: '二維碼已過期,請點擊刷新',
|
||||
qrExpiredShort: '二維碼已過期',
|
||||
qrExpiredWarning: '二維碼已過期,請點擊刷新獲取新的二維碼',
|
||||
qrScanned: '已掃碼,請在手機上確認登入',
|
||||
qrScannedShort: '已掃碼',
|
||||
qrScannedInfo: '已扫码,请在手机上确认登录',
|
||||
qrConfirmed: '登入成功,正在跳轉...',
|
||||
qrGenerating: '正在生成二維碼...'
|
||||
},
|
||||
qrTitle: '掃碼登入網易雲音樂',
|
||||
uidWarning: '注意:UID登入僅用於查看使用者公開資訊,無法訪問需要登入權限的功能'
|
||||
|
||||
@@ -14,6 +14,8 @@ export default {
|
||||
addCorrection: '提前 {num} 秒',
|
||||
subtractCorrection: '延遲 {num} 秒',
|
||||
playFailed: '目前歌曲播放失敗,播放下一首',
|
||||
parseFailedPlayNext: '歌曲解析失敗,播放下一首',
|
||||
consecutiveFailsError: '播放遇到錯誤,可能是網路波動或解析源失效,請切換播放清單或稍後重試',
|
||||
playMode: {
|
||||
sequence: '順序播放',
|
||||
loop: '單曲循環',
|
||||
@@ -29,7 +31,8 @@ export default {
|
||||
list: '自動播放下一個'
|
||||
},
|
||||
lrc: {
|
||||
noLrc: '暫無歌詞, 請欣賞'
|
||||
noLrc: '暫無歌詞, 請欣賞',
|
||||
noAutoScroll: '本歌詞不支持自動滾動'
|
||||
},
|
||||
reparse: {
|
||||
title: '選擇解析音源',
|
||||
@@ -39,7 +42,9 @@ export default {
|
||||
warning: '請選擇一個音源',
|
||||
bilibiliNotSupported: 'B站影片不支援重新解析',
|
||||
processing: '解析中...',
|
||||
clear: '清除自訂音源'
|
||||
clear: '清除自訂音源',
|
||||
customApiFailed: '自定義API解析失敗,正在嘗試使用內置音源...',
|
||||
customApiError: '自定義API請求出錯,正在嘗試使用內置音源...'
|
||||
},
|
||||
playBar: {
|
||||
expand: '展開歌詞',
|
||||
@@ -64,7 +69,17 @@ export default {
|
||||
unFavorite: '已取消收藏{name}',
|
||||
miniPlayBar: '迷你播放列',
|
||||
playbackSpeed: '播放速度',
|
||||
advancedControls: '更多設定s'
|
||||
advancedControls: '更多設定',
|
||||
intelligenceMode: {
|
||||
title: '心動模式',
|
||||
needCookieLogin: '請使用 Cookie 方式登入後使用心動模式',
|
||||
noFavoritePlaylist: '未找到我喜歡的音樂歌單',
|
||||
noLikedSongs: '您還沒有喜歡的歌曲',
|
||||
loading: '正在載入心動模式',
|
||||
success: '已載入 {count} 首歌曲',
|
||||
failed: '取得心動模式清單失敗',
|
||||
error: '心動模式播放出錯'
|
||||
}
|
||||
},
|
||||
eq: {
|
||||
title: '等化器',
|
||||
@@ -90,6 +105,11 @@ export default {
|
||||
custom: '自訂'
|
||||
}
|
||||
},
|
||||
// 播放器設定
|
||||
settings: {
|
||||
title: '播放設定',
|
||||
playbackSpeed: '播放速度'
|
||||
},
|
||||
// 定時關閉功能相關
|
||||
sleepTimer: {
|
||||
title: '定時關閉',
|
||||
|
||||
@@ -11,7 +11,8 @@ export default {
|
||||
},
|
||||
loading: {
|
||||
more: '載入中...',
|
||||
failed: '搜尋失敗'
|
||||
failed: '搜尋失敗',
|
||||
searching: '搜尋中...'
|
||||
},
|
||||
noMore: '沒有更多了',
|
||||
error: {
|
||||
@@ -23,5 +24,8 @@ export default {
|
||||
playlist: '歌單',
|
||||
mv: 'MV',
|
||||
bilibili: 'B站'
|
||||
}
|
||||
},
|
||||
history: '搜尋歷史',
|
||||
hot: '熱門搜尋',
|
||||
suggestions: '搜尋建議'
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
network: '網路設定',
|
||||
system: '系統管理',
|
||||
donation: '捐贈支持',
|
||||
regard: '關於'
|
||||
about: '關於'
|
||||
},
|
||||
basic: {
|
||||
themeMode: '主題模式',
|
||||
@@ -24,6 +24,7 @@ export default {
|
||||
tokenStatus: '目前Cookie狀態',
|
||||
tokenSet: '已設定',
|
||||
tokenNotSet: '未設定',
|
||||
setToken: '設定Cookie',
|
||||
setCookie: '設定Cookie',
|
||||
modifyToken: '修改Cookie',
|
||||
clearToken: '清除Cookie',
|
||||
@@ -50,7 +51,14 @@ export default {
|
||||
englishText: 'The quick brown fox jumps over the lazy dog',
|
||||
japaneseText: 'あいうえお かきくけこ さしすせそ',
|
||||
koreanText: '가나다라마 바사아자차 카타파하'
|
||||
}
|
||||
},
|
||||
gpuAcceleration: 'GPU加速',
|
||||
gpuAccelerationDesc: '啟用或禁用硬體加速,可以提高渲染性能,但可能會增加GPU負載',
|
||||
gpuAccelerationRestart: '更改GPU加速設定需要重啟應用後生效',
|
||||
gpuAccelerationChangeSuccess: 'GPU加速設定已更新,重啟應用後生效',
|
||||
gpuAccelerationChangeError: 'GPU加速設定更新失敗',
|
||||
tabletMode: '平板模式',
|
||||
tabletModeDesc: '啟用後將在移動設備上使用PC樣式界面,適合平板等大屏設備'
|
||||
},
|
||||
playback: {
|
||||
quality: '音質設定',
|
||||
@@ -78,7 +86,62 @@ export default {
|
||||
autoPlay: '自動播放',
|
||||
autoPlayDesc: '重新開啟應用程式時是否自動繼續播放',
|
||||
showStatusBar: '是否顯示狀態列控制功能',
|
||||
showStatusBarContent: '可以在您的mac狀態列顯示音樂控制功能(重啟後生效)'
|
||||
showStatusBarContent: '可以在您的mac狀態列顯示音樂控制功能(重啟後生效)',
|
||||
fallbackParser: '備用解析服務 (GD音樂台)',
|
||||
fallbackParserDesc: '當勾選「GD音樂台」且常規音源無法播放時,將使用此服務嘗試解析。',
|
||||
parserGD: 'GD 音樂台 (內建)',
|
||||
parserCustom: '自訂 API',
|
||||
|
||||
// 音源標籤
|
||||
sourceLabels: {
|
||||
migu: '咪咕音樂',
|
||||
kugou: '酷狗音樂',
|
||||
pyncmd: '網易雲(內建)',
|
||||
bilibili: 'Bilibili',
|
||||
gdmusic: 'GD音樂台',
|
||||
custom: '自訂 API'
|
||||
},
|
||||
|
||||
customApi: {
|
||||
sectionTitle: '自訂 API 設定',
|
||||
importConfig: '匯入 JSON 設定',
|
||||
currentSource: '目前音源',
|
||||
notImported: '尚未匯入自訂音源。',
|
||||
importSuccess: '成功匯入音源:{name}',
|
||||
importFailed: '匯入失敗:{message}',
|
||||
enableHint: '請先匯入 JSON 設定檔才能啟用',
|
||||
status: {
|
||||
imported: '已匯入自訂音源',
|
||||
notImported: '未匯入'
|
||||
}
|
||||
},
|
||||
lxMusic: {
|
||||
tabs: {
|
||||
sources: '音源選擇',
|
||||
lxMusic: '落雪音源',
|
||||
customApi: '自訂API'
|
||||
},
|
||||
scripts: {
|
||||
title: '已匯入的音源腳本',
|
||||
importLocal: '本機匯入',
|
||||
importOnline: '線上匯入',
|
||||
urlPlaceholder: '輸入落雪音源腳本 URL',
|
||||
importBtn: '匯入',
|
||||
empty: '暫無已匯入的落雪音源',
|
||||
notConfigured: '未設定 (請至落雪音源分頁設定)',
|
||||
importHint: '匯入相容的自訂 API 外掛以擴充音源',
|
||||
noScriptWarning: '請先匯入落雪音源腳本',
|
||||
noSelectionWarning: '請先選擇一個落雪音源',
|
||||
notFound: '音源不存在',
|
||||
switched: '已切換到音源: {name}',
|
||||
deleted: '已刪除音源: {name}',
|
||||
enterUrl: '請輸入腳本 URL',
|
||||
invalidUrl: '無效的 URL 格式',
|
||||
invalidScript: '無效的落雪音源腳本,未找到 globalThis.lx 相關程式碼',
|
||||
nameRequired: '名稱不能為空',
|
||||
renameSuccess: '重新命名成功'
|
||||
}
|
||||
}
|
||||
},
|
||||
application: {
|
||||
closeAction: '關閉行為',
|
||||
@@ -182,6 +245,7 @@ export default {
|
||||
display: '顯示',
|
||||
interface: '介面',
|
||||
typography: '文字',
|
||||
background: '背景',
|
||||
mobile: '行動端'
|
||||
},
|
||||
pureMode: '純淨模式',
|
||||
@@ -204,11 +268,77 @@ export default {
|
||||
medium: '中',
|
||||
large: '大'
|
||||
},
|
||||
fontWeight: '字體粗細',
|
||||
fontWeightMarks: {
|
||||
thin: '細',
|
||||
normal: '常規',
|
||||
bold: '粗'
|
||||
},
|
||||
letterSpacing: '字間距',
|
||||
letterSpacingMarks: {
|
||||
compact: '緊湊',
|
||||
default: '預設',
|
||||
loose: '寬鬆'
|
||||
},
|
||||
lineHeight: '行高',
|
||||
lineHeightMarks: {
|
||||
compact: '緊湊',
|
||||
default: '預設',
|
||||
loose: '寬鬆'
|
||||
},
|
||||
contentWidth: '內容區寬度',
|
||||
mobileLayout: '行動端佈局',
|
||||
layoutOptions: {
|
||||
default: '預設',
|
||||
ios: 'iOS 風格',
|
||||
android: 'Android 風格'
|
||||
},
|
||||
mobileCoverStyle: '封面風格',
|
||||
coverOptions: {
|
||||
record: '唱片',
|
||||
square: '方形',
|
||||
full: '全螢幕'
|
||||
},
|
||||
lyricLines: '歌詞行數',
|
||||
mobileUnavailable: '此設定僅在行動端可用',
|
||||
// 背景設定
|
||||
background: {
|
||||
useCustomBackground: '使用自訂背景',
|
||||
backgroundMode: '背景模式',
|
||||
modeOptions: {
|
||||
solid: '純色',
|
||||
gradient: '漸層',
|
||||
image: '圖片',
|
||||
css: 'CSS'
|
||||
},
|
||||
solidColor: '選擇顏色',
|
||||
presetColors: '預設顏色',
|
||||
customColor: '自訂顏色',
|
||||
gradientEditor: '漸層編輯器',
|
||||
gradientColors: '漸層顏色',
|
||||
gradientDirection: '漸層方向',
|
||||
directionOptions: {
|
||||
toBottom: '上到下',
|
||||
toRight: '左到右',
|
||||
toBottomRight: '左上到右下',
|
||||
angle45: '45度',
|
||||
toTop: '下到上',
|
||||
toLeft: '右到左'
|
||||
},
|
||||
addColor: '新增顏色',
|
||||
removeColor: '移除顏色',
|
||||
imageUpload: '上傳圖片',
|
||||
imagePreview: '圖片預覽',
|
||||
clearImage: '清除圖片',
|
||||
imageBlur: '模糊度',
|
||||
imageBrightness: '明暗度',
|
||||
customCss: '自訂 CSS 樣式',
|
||||
customCssPlaceholder: '輸入 CSS 樣式,如: background: linear-gradient(...)',
|
||||
customCssHelp: '支援任意 CSS background 屬性',
|
||||
reset: '重設為預設',
|
||||
fileSizeLimit: '圖片大小限制: 20MB',
|
||||
invalidImageFormat: '無效的圖片格式',
|
||||
imageTooLarge: '圖片過大,請選擇小於 20MB 的圖片'
|
||||
}
|
||||
},
|
||||
themeColor: {
|
||||
@@ -231,6 +361,51 @@ export default {
|
||||
},
|
||||
placeholder: '#1db954'
|
||||
},
|
||||
translationEngine: '歌詞翻譯引擎',
|
||||
translationEngineOptions: {
|
||||
none: '關閉',
|
||||
opencc: 'OpenCC 繁化'
|
||||
},
|
||||
shortcutSettings: {
|
||||
title: '快捷鍵設定',
|
||||
shortcut: '快捷鍵',
|
||||
shortcutDesc: '自訂快捷鍵',
|
||||
shortcutConflict: '快捷鍵衝突',
|
||||
inputPlaceholder: '點擊輸入快捷鍵',
|
||||
resetShortcuts: '恢復預設',
|
||||
disableAll: '全部停用',
|
||||
enableAll: '全部啟用',
|
||||
togglePlay: '播放/暫停',
|
||||
prevPlay: '上一首',
|
||||
nextPlay: '下一首',
|
||||
volumeUp: '增加音量',
|
||||
volumeDown: '減少音量',
|
||||
toggleFavorite: '收藏/取消收藏',
|
||||
toggleWindow: '顯示/隱藏視窗',
|
||||
scopeGlobal: '全域',
|
||||
scopeApp: '應用程式內',
|
||||
enabled: '已啟用',
|
||||
disabled: '已停用',
|
||||
messages: {
|
||||
resetSuccess: '已恢復預設快捷鍵,請記得儲存',
|
||||
conflict: '存在快捷鍵衝突,請重新設定',
|
||||
saveSuccess: '快捷鍵設定已儲存',
|
||||
saveError: '快捷鍵儲存失敗,請重試',
|
||||
cancelEdit: '已取消修改',
|
||||
disableAll: '已停用所有快捷鍵,請記得儲存',
|
||||
enableAll: '已啟用所有快捷鍵,請記得儲存'
|
||||
}
|
||||
},
|
||||
remoteControl: {
|
||||
title: '遠端控制',
|
||||
enable: '啟用遠端控制',
|
||||
port: '服務連接埠',
|
||||
allowedIps: '允許的 IP 位址',
|
||||
addIp: '新增 IP',
|
||||
emptyListHint: '空白清單表示允許所有 IP 存取',
|
||||
saveSuccess: '遠端控制設定已儲存',
|
||||
accessInfo: '遠端控制存取位址:'
|
||||
},
|
||||
cookie: {
|
||||
title: 'Cookie設定',
|
||||
description: '請輸入網易雲音樂的Cookie:',
|
||||
|
||||
@@ -10,6 +10,11 @@ export default {
|
||||
trackCount: '{count}首',
|
||||
playCount: '播放{count}次'
|
||||
},
|
||||
tabs: {
|
||||
created: '建立',
|
||||
favorite: '收藏',
|
||||
album: '專輯'
|
||||
},
|
||||
ranking: {
|
||||
title: '聽歌排行',
|
||||
playCount: '{count}次'
|
||||
|
||||
@@ -9,6 +9,7 @@ import { initializeConfig } from './modules/config';
|
||||
import { initializeFileManager } from './modules/fileManager';
|
||||
import { initializeFonts } from './modules/fonts';
|
||||
import { initializeLoginWindow } from './modules/loginWindow';
|
||||
import { initializeOtherApi } from './modules/otherApi';
|
||||
import { initializeRemoteControl } from './modules/remoteControl';
|
||||
import { initializeShortcuts, registerShortcuts } from './modules/shortcuts';
|
||||
import { initializeTray, updateCurrentSong, updatePlayState, updateTrayMenu } from './modules/tray';
|
||||
@@ -16,6 +17,7 @@ import { setupUpdateHandlers } from './modules/update';
|
||||
import { createMainWindow, initializeWindowManager, setAppQuitting } from './modules/window';
|
||||
import { initWindowSizeManager } from './modules/window-size';
|
||||
import { startMusicApi } from './server';
|
||||
import { initLxMusicHttp } from './modules/lxMusicHttp';
|
||||
|
||||
// 导入所有图标
|
||||
const iconPath = join(__dirname, '../../resources');
|
||||
@@ -26,9 +28,9 @@ const icon = nativeImage.createFromPath(
|
||||
let mainWindow: Electron.BrowserWindow;
|
||||
|
||||
// 初始化应用
|
||||
function initialize() {
|
||||
// 初始化配置管理
|
||||
const store = initializeConfig();
|
||||
function initialize(configStore: any) {
|
||||
// 使用已初始化的配置存储
|
||||
const store = configStore;
|
||||
|
||||
// 设置初始语言
|
||||
const savedLanguage = store.get('set.language') as Language;
|
||||
@@ -38,6 +40,8 @@ function initialize() {
|
||||
|
||||
// 初始化文件管理
|
||||
initializeFileManager();
|
||||
// 初始化其他 API (搜索建议等)
|
||||
initializeOtherApi();
|
||||
// 初始化窗口管理
|
||||
initializeWindowManager();
|
||||
// 初始化字体管理
|
||||
@@ -54,6 +58,9 @@ function initialize() {
|
||||
// 启动音乐API
|
||||
startMusicApi();
|
||||
|
||||
// 初始化落雪音乐 HTTP 请求处理
|
||||
initLxMusicHttp();
|
||||
|
||||
// 加载歌词窗口
|
||||
loadLyricWindow(ipcMain, mainWindow);
|
||||
|
||||
@@ -73,6 +80,23 @@ const isSingleInstance = app.requestSingleInstanceLock();
|
||||
if (!isSingleInstance) {
|
||||
app.quit();
|
||||
} else {
|
||||
// 在应用准备就绪前初始化GPU加速设置
|
||||
// 必须在 app.ready 之前调用 disableHardwareAcceleration
|
||||
try {
|
||||
// 初始化配置管理以获取GPU加速设置
|
||||
const store = initializeConfig();
|
||||
const enableGpuAcceleration = store.get('set.enableGpuAcceleration', true) as boolean;
|
||||
|
||||
if (!enableGpuAcceleration) {
|
||||
console.log('GPU加速已禁用');
|
||||
app.disableHardwareAcceleration();
|
||||
} else {
|
||||
console.log('GPU加速已启用');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('GPU加速设置初始化失败:', error);
|
||||
// 如果配置读取失败,默认启用GPU加速
|
||||
}
|
||||
// 当第二个实例启动时,将焦点转移到第一个实例的窗口
|
||||
app.on('second-instance', () => {
|
||||
if (mainWindow) {
|
||||
@@ -97,12 +121,15 @@ if (!isSingleInstance) {
|
||||
// 初始化窗口大小管理器
|
||||
initWindowSizeManager();
|
||||
|
||||
// 重新初始化配置管理以获取完整的配置存储
|
||||
const store = initializeConfig();
|
||||
|
||||
// 初始化应用
|
||||
initialize();
|
||||
initialize(store);
|
||||
|
||||
// macOS 激活应用时的处理
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) initialize();
|
||||
if (mainWindow === null) initialize(store);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -218,9 +218,6 @@ export const loadLyricWindow = (ipcMain: IpcMain, mainWin: BrowserWindow): void
|
||||
// 记录原始窗口大小
|
||||
const [width, height] = lyricWindow.getSize();
|
||||
originalSize = { width, height };
|
||||
|
||||
// 在拖动时暂时禁用大小调整
|
||||
lyricWindow.setResizable(false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -230,9 +227,6 @@ export const loadLyricWindow = (ipcMain: IpcMain, mainWin: BrowserWindow): void
|
||||
if (lyricWindow && !lyricWindow.isDestroyed()) {
|
||||
// 确保窗口大小恢复原样
|
||||
lyricWindow.setSize(originalSize.width, originalSize.height);
|
||||
|
||||
// 拖动结束后恢复可调整大小
|
||||
lyricWindow.setResizable(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ type SetConfig = {
|
||||
fontScope: 'global' | 'lyric';
|
||||
language: string;
|
||||
showTopAction: boolean;
|
||||
enableGpuAcceleration: boolean;
|
||||
};
|
||||
interface StoreType {
|
||||
set: SetConfig;
|
||||
@@ -57,6 +58,23 @@ export function initializeConfig() {
|
||||
_.returnValue = value || '';
|
||||
});
|
||||
|
||||
// GPU加速设置更新处理
|
||||
// 注意:GPU加速设置必须在应用启动时在app.ready之前设置才能生效
|
||||
ipcMain.on('update-gpu-acceleration', (event, enabled: boolean) => {
|
||||
try {
|
||||
console.log('GPU加速设置更新:', enabled);
|
||||
store.set('set.enableGpuAcceleration', enabled);
|
||||
|
||||
// GPU加速设置需要重启应用才能生效
|
||||
event.sender.send('gpu-acceleration-updated', enabled);
|
||||
console.log('GPU加速设置已保存,重启应用后生效');
|
||||
} catch (error) {
|
||||
console.error('GPU加速设置更新失败:', error);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
event.sender.send('gpu-acceleration-update-error', errorMessage);
|
||||
}
|
||||
});
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import axios from 'axios';
|
||||
import { app, dialog, ipcMain, Notification, protocol, shell } from 'electron';
|
||||
import Store from 'electron-store';
|
||||
import { fileTypeFromFile } from 'file-type';
|
||||
import { FlacTagMap, writeFlacTags } from 'flac-tagger';
|
||||
import * as fs from 'fs';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
@@ -9,6 +10,7 @@ import * as mm from 'music-metadata';
|
||||
import * as NodeID3 from 'node-id3';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import sharp from 'sharp';
|
||||
|
||||
import { getStore } from './config';
|
||||
|
||||
@@ -275,6 +277,80 @@ export function initializeFileManager() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 处理导入自定义API插件的请求
|
||||
ipcMain.handle('import-custom-api-plugin', async () => {
|
||||
const result = await dialog.showOpenDialog({
|
||||
title: '选择自定义音源配置文件',
|
||||
filters: [{ name: 'JSON Files', extensions: ['json'] }],
|
||||
properties: ['openFile']
|
||||
});
|
||||
|
||||
if (result.canceled || result.filePaths.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const filePath = result.filePaths[0];
|
||||
try {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
||||
|
||||
// 基础验证,确保它是个合法的JSON并且包含关键字段
|
||||
const pluginData = JSON.parse(fileContent);
|
||||
if (!pluginData.name || !pluginData.apiUrl) {
|
||||
throw new Error('无效的插件文件,缺少 name 或 apiUrl 字段。');
|
||||
}
|
||||
|
||||
return {
|
||||
name: pluginData.name,
|
||||
content: fileContent // 返回完整的JSON字符串
|
||||
};
|
||||
} catch (error: any) {
|
||||
console.error('读取或解析插件文件失败:', error);
|
||||
// 向渲染进程抛出错误,以便UI可以显示提示
|
||||
throw new Error(`文件读取或解析失败: ${error.message}`);
|
||||
}
|
||||
});
|
||||
|
||||
// 处理导入落雪音源脚本的请求
|
||||
ipcMain.handle('import-lx-music-script', async () => {
|
||||
const result = await dialog.showOpenDialog({
|
||||
title: '选择落雪音源脚本文件',
|
||||
filters: [{ name: 'JavaScript Files', extensions: ['js'] }],
|
||||
properties: ['openFile']
|
||||
});
|
||||
|
||||
if (result.canceled || result.filePaths.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const filePath = result.filePaths[0];
|
||||
try {
|
||||
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
||||
|
||||
// 验证脚本格式:检查是否包含落雪音源特征
|
||||
if (
|
||||
!fileContent.includes('globalThis.lx') &&
|
||||
!fileContent.includes('lx.on') &&
|
||||
!fileContent.includes('EVENT_NAMES')
|
||||
) {
|
||||
throw new Error('无效的落雪音源脚本,未找到 globalThis.lx 相关代码。');
|
||||
}
|
||||
|
||||
// 检查是否包含必要的元信息注释
|
||||
const hasMetaComment = fileContent.includes('@name');
|
||||
if (!hasMetaComment) {
|
||||
console.warn('警告: 脚本缺少 @name 元信息注释');
|
||||
}
|
||||
|
||||
return {
|
||||
name: path.basename(filePath, '.js'),
|
||||
content: fileContent
|
||||
};
|
||||
} catch (error: any) {
|
||||
console.error('读取落雪音源脚本失败:', error);
|
||||
throw new Error(`脚本读取失败: ${error.message}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,7 +462,7 @@ async function downloadMusic(
|
||||
let formattedFilename = filename;
|
||||
if (songInfo) {
|
||||
// 准备替换变量
|
||||
const artistName = songInfo.ar?.map((a: any) => a.name).join('/') || '未知艺术家';
|
||||
const artistName = songInfo.ar?.map((a: any) => a.name).join('、') || '未知艺术家';
|
||||
const songName = songInfo.name || filename;
|
||||
const albumName = songInfo.al?.name || '未知专辑';
|
||||
|
||||
@@ -576,8 +652,38 @@ async function downloadMusic(
|
||||
timeout: 10000
|
||||
});
|
||||
|
||||
// 获取封面图片的buffer
|
||||
coverImageBuffer = Buffer.from(coverResponse.data);
|
||||
const originalCoverBuffer = Buffer.from(coverResponse.data);
|
||||
const TWO_MB = 2 * 1024 * 1024;
|
||||
// 检查图片大小是否超过2MB
|
||||
if (originalCoverBuffer.length > TWO_MB) {
|
||||
const originalSizeMB = (originalCoverBuffer.length / (1024 * 1024)).toFixed(2);
|
||||
console.log(`封面图大于2MB (${originalSizeMB} MB),开始压缩...`);
|
||||
try {
|
||||
// 使用 sharp 进行压缩
|
||||
coverImageBuffer = await sharp(originalCoverBuffer)
|
||||
.resize({
|
||||
width: 1600,
|
||||
height: 1600,
|
||||
fit: 'inside',
|
||||
withoutEnlargement: true
|
||||
})
|
||||
.jpeg({
|
||||
quality: 80,
|
||||
mozjpeg: true
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
const compressedSizeMB = (coverImageBuffer.length / (1024 * 1024)).toFixed(2);
|
||||
console.log(`封面图压缩完成,新大小: ${compressedSizeMB} MB`);
|
||||
} catch (compressionError) {
|
||||
console.error('封面图压缩失败,将使用原图:', compressionError);
|
||||
coverImageBuffer = originalCoverBuffer; // 如果压缩失败,则回退使用原始图片
|
||||
}
|
||||
} else {
|
||||
// 如果图片不大于2MB,直接使用原图
|
||||
coverImageBuffer = originalCoverBuffer;
|
||||
}
|
||||
|
||||
console.log('封面已准备好,将写入元数据');
|
||||
}
|
||||
}
|
||||
@@ -588,7 +694,7 @@ async function downloadMusic(
|
||||
|
||||
const fileFormat = fileExtension.toLowerCase();
|
||||
const artistNames =
|
||||
(songInfo?.ar || songInfo?.song?.artists)?.map((a: any) => a.name).join('/ ') || '未知艺术家';
|
||||
(songInfo?.ar || songInfo?.song?.artists)?.map((a: any) => a.name).join('、') || '未知艺术家';
|
||||
|
||||
// 根据文件类型处理元数据
|
||||
if (['.mp3'].includes(fileFormat)) {
|
||||
@@ -598,7 +704,7 @@ async function downloadMusic(
|
||||
NodeID3.removeTags(finalFilePath);
|
||||
|
||||
const tags = {
|
||||
title: filename,
|
||||
title: songInfo?.name,
|
||||
artist: artistNames,
|
||||
TPE1: artistNames,
|
||||
TPE2: artistNames,
|
||||
@@ -634,10 +740,35 @@ async function downloadMusic(
|
||||
} catch (err) {
|
||||
console.error('Error writing ID3 tags:', err);
|
||||
}
|
||||
} else {
|
||||
// 对于非MP3文件,使用music-metadata来写入元数据可能需要专门的库
|
||||
// 或者根据不同文件类型使用专用工具,暂时只记录但不处理
|
||||
console.log(`文件类型 ${fileFormat} 不支持使用NodeID3写入标签,跳过元数据写入`);
|
||||
} else if (['.flac'].includes(fileFormat)) {
|
||||
try {
|
||||
const tagMap: FlacTagMap = {
|
||||
TITLE: songInfo?.name,
|
||||
ARTIST: artistNames,
|
||||
ALBUM: songInfo?.al?.name || songInfo?.song?.album?.name || songInfo?.name || filename,
|
||||
LYRICS: lyricsContent || '',
|
||||
TRACKNUMBER: songInfo?.no ? String(songInfo.no) : undefined,
|
||||
DATE: songInfo?.publishTime
|
||||
? new Date(songInfo.publishTime).getFullYear().toString()
|
||||
: undefined
|
||||
};
|
||||
|
||||
await writeFlacTags(
|
||||
{
|
||||
tagMap,
|
||||
picture: coverImageBuffer
|
||||
? {
|
||||
buffer: coverImageBuffer,
|
||||
mime: 'image/jpeg'
|
||||
}
|
||||
: undefined
|
||||
},
|
||||
finalFilePath
|
||||
);
|
||||
console.log('FLAC tags written successfully');
|
||||
} catch (err) {
|
||||
console.error('Error writing FLAC tags:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// 保存下载信息
|
||||
@@ -683,7 +814,7 @@ async function downloadMusic(
|
||||
// 发送桌面通知
|
||||
try {
|
||||
const artistNames =
|
||||
(songInfo?.ar || songInfo?.song?.artists)?.map((a: any) => a.name).join('/') ||
|
||||
(songInfo?.ar || songInfo?.song?.artists)?.map((a: any) => a.name).join('、') ||
|
||||
'未知艺术家';
|
||||
const notification = new Notification({
|
||||
title: '下载完成',
|
||||
|
||||
153
src/main/modules/lxMusicHttp.ts
Normal file
153
src/main/modules/lxMusicHttp.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
/**
|
||||
* 落雪音乐 HTTP 请求处理(主进程)
|
||||
* 绕过渲染进程的 CORS 限制
|
||||
*/
|
||||
|
||||
import { ipcMain } from 'electron';
|
||||
import fetch, { type RequestInit } from 'node-fetch';
|
||||
|
||||
interface LxHttpRequest {
|
||||
url: string;
|
||||
options: {
|
||||
method?: string;
|
||||
headers?: Record<string, string>;
|
||||
body?: string;
|
||||
form?: Record<string, string>;
|
||||
formData?: Record<string, string>;
|
||||
timeout?: number;
|
||||
};
|
||||
requestId: string;
|
||||
}
|
||||
|
||||
interface LxHttpResponse {
|
||||
statusCode: number;
|
||||
headers: Record<string, string | string[]>;
|
||||
body: any;
|
||||
}
|
||||
|
||||
// 取消控制器映射
|
||||
const abortControllers = new Map<string, AbortController>();
|
||||
|
||||
/**
|
||||
* 初始化 HTTP 请求处理
|
||||
*/
|
||||
export const initLxMusicHttp = () => {
|
||||
// 处理 HTTP 请求
|
||||
ipcMain.handle(
|
||||
'lx-music-http-request',
|
||||
async (_, request: LxHttpRequest): Promise<LxHttpResponse> => {
|
||||
const { url, options, requestId } = request;
|
||||
const controller = new AbortController();
|
||||
|
||||
// 保存取消控制器
|
||||
abortControllers.set(requestId, controller);
|
||||
|
||||
try {
|
||||
console.log(`[LxMusicHttp] 请求: ${options.method || 'GET'} ${url}`);
|
||||
|
||||
const fetchOptions: RequestInit = {
|
||||
method: options.method || 'GET',
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
|
||||
...(options.headers || {})
|
||||
},
|
||||
signal: controller.signal
|
||||
};
|
||||
|
||||
// 处理请求体
|
||||
if (options.body) {
|
||||
fetchOptions.body = options.body;
|
||||
} else if (options.form) {
|
||||
const formData = new URLSearchParams(options.form);
|
||||
fetchOptions.body = formData.toString();
|
||||
fetchOptions.headers = {
|
||||
...fetchOptions.headers,
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
} else if (options.formData) {
|
||||
// node-fetch 的 FormData 需要特殊处理
|
||||
const FormData = (await import('form-data')).default;
|
||||
const formData = new FormData();
|
||||
for (const [key, value] of Object.entries(options.formData)) {
|
||||
formData.append(key, value);
|
||||
}
|
||||
fetchOptions.body = formData as any;
|
||||
// FormData 会自动设置 Content-Type
|
||||
}
|
||||
|
||||
// 设置超时
|
||||
const timeout = options.timeout || 30000;
|
||||
const timeoutId = setTimeout(() => {
|
||||
console.warn(`[LxMusicHttp] 请求超时: ${url}`);
|
||||
controller.abort();
|
||||
}, timeout);
|
||||
|
||||
const response = await fetch(url, fetchOptions);
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
console.log(`[LxMusicHttp] 响应: ${response.status} ${url}`);
|
||||
|
||||
// 读取响应体
|
||||
const rawBody = await response.text();
|
||||
|
||||
// 尝试解析 JSON
|
||||
let parsedBody: any = rawBody;
|
||||
const contentType = response.headers.get('content-type') || '';
|
||||
if (
|
||||
contentType.includes('application/json') ||
|
||||
rawBody.startsWith('{') ||
|
||||
rawBody.startsWith('[')
|
||||
) {
|
||||
try {
|
||||
parsedBody = JSON.parse(rawBody);
|
||||
} catch {
|
||||
// 解析失败则使用原始字符串
|
||||
}
|
||||
}
|
||||
|
||||
// 转换 headers 为普通对象
|
||||
const headers: Record<string, string | string[]> = {};
|
||||
response.headers.forEach((value, key) => {
|
||||
headers[key] = value;
|
||||
});
|
||||
|
||||
const result: LxHttpResponse = {
|
||||
statusCode: response.status,
|
||||
headers,
|
||||
body: parsedBody
|
||||
};
|
||||
|
||||
return result;
|
||||
} catch (error: any) {
|
||||
console.error(`[LxMusicHttp] 请求失败: ${url}`, error.message);
|
||||
throw error;
|
||||
} finally {
|
||||
// 清理取消控制器
|
||||
abortControllers.delete(requestId);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 处理请求取消
|
||||
ipcMain.handle('lx-music-http-cancel', (_, requestId: string) => {
|
||||
const controller = abortControllers.get(requestId);
|
||||
if (controller) {
|
||||
console.log(`[LxMusicHttp] 取消请求: ${requestId}`);
|
||||
controller.abort();
|
||||
abortControllers.delete(requestId);
|
||||
}
|
||||
});
|
||||
|
||||
console.log('[LxMusicHttp] HTTP 请求处理已初始化');
|
||||
};
|
||||
|
||||
/**
|
||||
* 清理所有正在进行的请求
|
||||
*/
|
||||
export const cleanupLxMusicHttp = () => {
|
||||
for (const [requestId, controller] of abortControllers.entries()) {
|
||||
console.log(`[LxMusicHttp] 清理请求: ${requestId}`);
|
||||
controller.abort();
|
||||
}
|
||||
abortControllers.clear();
|
||||
};
|
||||
28
src/main/modules/otherApi.ts
Normal file
28
src/main/modules/otherApi.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import axios from 'axios';
|
||||
import { ipcMain } from 'electron';
|
||||
|
||||
/**
|
||||
* 初始化其他杂项 API(如搜索建议等)
|
||||
*/
|
||||
export function initializeOtherApi() {
|
||||
// 搜索建议(从酷狗获取)
|
||||
ipcMain.handle('get-search-suggestions', async (_, keyword: string) => {
|
||||
if (!keyword || !keyword.trim()) {
|
||||
return [];
|
||||
}
|
||||
try {
|
||||
console.log(`[Main Process Proxy] Forwarding suggestion request for: ${keyword}`);
|
||||
const response = await axios.get('http://msearchcdn.kugou.com/new/app/i/search.php', {
|
||||
params: {
|
||||
cmd: 302,
|
||||
keyword: keyword
|
||||
},
|
||||
timeout: 5000
|
||||
});
|
||||
return response.data;
|
||||
} catch (error: any) {
|
||||
console.error('[Main Process Proxy] Failed to fetch search suggestions:', error.message);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -59,6 +59,13 @@ function getSongTitle(song: SongInfo | null): string {
|
||||
return artistStr ? `${song.name} - ${artistStr}` : song.name;
|
||||
}
|
||||
|
||||
// 截断歌曲标题,防止菜单中显示过长
|
||||
function getTruncatedSongTitle(song: SongInfo | null, maxLength: number = 14): string {
|
||||
const fullTitle = getSongTitle(song);
|
||||
if (fullTitle.length <= maxLength) return fullTitle;
|
||||
return fullTitle.slice(0, maxLength) + '...';
|
||||
}
|
||||
|
||||
// 更新当前播放的音乐信息
|
||||
export function updateCurrentSong(song: SongInfo | null) {
|
||||
currentSong = song;
|
||||
@@ -143,7 +150,7 @@ export function updateTrayMenu(mainWindow: BrowserWindow) {
|
||||
if (currentSong) {
|
||||
menu.append(
|
||||
new MenuItem({
|
||||
label: getSongTitle(currentSong),
|
||||
label: getTruncatedSongTitle(currentSong),
|
||||
enabled: false,
|
||||
type: 'normal'
|
||||
})
|
||||
@@ -250,7 +257,7 @@ export function updateTrayMenu(mainWindow: BrowserWindow) {
|
||||
...((currentSong
|
||||
? [
|
||||
{
|
||||
label: getSongTitle(currentSong),
|
||||
label: getTruncatedSongTitle(currentSong),
|
||||
enabled: false,
|
||||
type: 'normal'
|
||||
},
|
||||
|
||||
@@ -143,6 +143,12 @@ export function initializeWindowManager() {
|
||||
}
|
||||
});
|
||||
|
||||
// 强制退出应用(用于免责声明拒绝等场景)
|
||||
ipcMain.on('quit-app', () => {
|
||||
setAppQuitting(true);
|
||||
app.quit();
|
||||
});
|
||||
|
||||
ipcMain.on('mini-tray', (event) => {
|
||||
const win = BrowserWindow.fromWebContents(event.sender);
|
||||
if (win) {
|
||||
|
||||
@@ -23,14 +23,57 @@ ipcMain.handle('unblock-music', async (_event, id, songData, enabledSources) =>
|
||||
}
|
||||
});
|
||||
|
||||
async function startMusicApi(): Promise<void> {
|
||||
console.log('MUSIC API STARTED');
|
||||
|
||||
const port = (store.get('set') as any).musicApiPort || 30488;
|
||||
|
||||
await server.serveNcmApi({
|
||||
port
|
||||
/**
|
||||
* 检查端口是否可用
|
||||
*/
|
||||
function checkPortAvailable(port: number): Promise<boolean> {
|
||||
return new Promise((resolve) => {
|
||||
const net = require('net');
|
||||
const tester = net
|
||||
.createServer()
|
||||
.once('error', () => {
|
||||
resolve(false);
|
||||
})
|
||||
.once('listening', () => {
|
||||
tester.close(() => resolve(true));
|
||||
})
|
||||
.listen(port);
|
||||
});
|
||||
}
|
||||
|
||||
async function startMusicApi(): Promise<void> {
|
||||
console.log('MUSIC API STARTING...');
|
||||
|
||||
const settings = store.get('set') as any;
|
||||
let port = settings?.musicApiPort || 30488;
|
||||
const maxRetries = 10;
|
||||
|
||||
// 检查端口是否可用,如果不可用则尝试下一个端口
|
||||
for (let i = 0; i < maxRetries; i++) {
|
||||
const isAvailable = await checkPortAvailable(port);
|
||||
if (isAvailable) {
|
||||
break;
|
||||
}
|
||||
console.log(`端口 ${port} 被占用,尝试切换到端口 ${port + 1}`);
|
||||
port++;
|
||||
}
|
||||
|
||||
// 如果端口发生变化,保存新端口到配置
|
||||
const originalPort = settings?.musicApiPort || 30488;
|
||||
if (port !== originalPort) {
|
||||
console.log(`端口从 ${originalPort} 切换到 ${port}`);
|
||||
store.set('set', { ...settings, musicApiPort: port });
|
||||
}
|
||||
|
||||
try {
|
||||
await server.serveNcmApi({
|
||||
port
|
||||
});
|
||||
console.log(`MUSIC API STARTED on port ${port}`);
|
||||
} catch (error) {
|
||||
console.error(`MUSIC API 启动失败:`, error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export { startMusicApi };
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"musicApiPort": 30488,
|
||||
"closeAction": "ask",
|
||||
"musicQuality": "higher",
|
||||
"lyricTranslationEngine": "none",
|
||||
"fontFamily": "system-ui",
|
||||
"fontScope": "global",
|
||||
"autoPlay": false,
|
||||
@@ -23,9 +24,15 @@
|
||||
"alwaysShowDownloadButton": false,
|
||||
"unlimitedDownload": false,
|
||||
"enableMusicUnblock": true,
|
||||
"enabledMusicSources": ["migu", "kugou", "pyncmd", "bilibili"],
|
||||
"enabledMusicSources": ["migu", "kugou", "pyncmd"],
|
||||
"showTopAction": false,
|
||||
"contentZoomFactor": 1,
|
||||
"autoTheme": false,
|
||||
"manualTheme": "light"
|
||||
"manualTheme": "light",
|
||||
"isMenuExpanded": false,
|
||||
"customApiPlugin": "",
|
||||
"customApiPluginName": "",
|
||||
"lxMusicScripts": [],
|
||||
"activeLxMusicApiId": null,
|
||||
"enableGpuAcceleration": true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import match from '@unblockneteasemusic/server';
|
||||
|
||||
type Platform = 'qq' | 'migu' | 'kugou' | 'pyncmd' | 'joox' | 'bilibili';
|
||||
type Platform = 'qq' | 'migu' | 'kugou' | 'kuwo' | 'pyncmd' | 'joox' | 'bilibili';
|
||||
|
||||
interface SongData {
|
||||
name: string;
|
||||
@@ -30,7 +30,7 @@ interface UnblockResult {
|
||||
}
|
||||
|
||||
// 所有可用平台
|
||||
export const ALL_PLATFORMS: Platform[] = ['migu', 'kugou', 'pyncmd', 'bilibili'];
|
||||
export const ALL_PLATFORMS: Platform[] = ['migu', 'kugou', 'kuwo', 'pyncmd', 'bilibili'];
|
||||
|
||||
/**
|
||||
* 确保对象数据结构完整,处理null或undefined的情况
|
||||
|
||||
6
src/preload/index.d.ts
vendored
6
src/preload/index.d.ts
vendored
@@ -4,6 +4,7 @@ interface API {
|
||||
minimize: () => void;
|
||||
maximize: () => void;
|
||||
close: () => void;
|
||||
quitApp: () => void;
|
||||
dragStart: (data: any) => void;
|
||||
miniTray: () => void;
|
||||
miniWindow: () => void;
|
||||
@@ -21,7 +22,12 @@ interface API {
|
||||
onDownloadComplete: (callback: (success: boolean, filePath: string) => void) => void;
|
||||
onLanguageChanged: (callback: (locale: string) => void) => void;
|
||||
removeDownloadListeners: () => void;
|
||||
importCustomApiPlugin: () => Promise<{ name: string; content: string } | null>;
|
||||
importLxMusicScript: () => Promise<{ name: string; content: string } | null>;
|
||||
invoke: (channel: string, ...args: any[]) => Promise<any>;
|
||||
getSearchSuggestions: (keyword: string) => Promise<any>;
|
||||
lxMusicHttpRequest: (request: { url: string; options: any; requestId: string }) => Promise<any>;
|
||||
lxMusicHttpCancel: (requestId: string) => Promise<void>;
|
||||
}
|
||||
|
||||
// 自定义IPC渲染进程通信接口
|
||||
|
||||
@@ -6,6 +6,7 @@ const api = {
|
||||
minimize: () => ipcRenderer.send('minimize-window'),
|
||||
maximize: () => ipcRenderer.send('maximize-window'),
|
||||
close: () => ipcRenderer.send('close-window'),
|
||||
quitApp: () => ipcRenderer.send('quit-app'),
|
||||
dragStart: (data) => ipcRenderer.send('drag-start', data),
|
||||
miniTray: () => ipcRenderer.send('mini-tray'),
|
||||
miniWindow: () => ipcRenderer.send('mini-window'),
|
||||
@@ -18,6 +19,8 @@ const api = {
|
||||
sendSong: (data) => ipcRenderer.send('update-current-song', data),
|
||||
unblockMusic: (id, data, enabledSources) =>
|
||||
ipcRenderer.invoke('unblock-music', id, data, enabledSources),
|
||||
importCustomApiPlugin: () => ipcRenderer.invoke('import-custom-api-plugin'),
|
||||
importLxMusicScript: () => ipcRenderer.invoke('import-lx-music-script'),
|
||||
// 歌词窗口关闭事件
|
||||
onLyricWindowClosed: (callback: () => void) => {
|
||||
ipcRenderer.on('lyric-window-closed', () => callback());
|
||||
@@ -54,7 +57,15 @@ const api = {
|
||||
return ipcRenderer.invoke(channel, ...args);
|
||||
}
|
||||
return Promise.reject(new Error(`未授权的 IPC 通道: ${channel}`));
|
||||
}
|
||||
},
|
||||
// 搜索建议
|
||||
getSearchSuggestions: (keyword: string) => ipcRenderer.invoke('get-search-suggestions', keyword),
|
||||
|
||||
// 落雪音乐 HTTP 请求(绕过 CORS)
|
||||
lxMusicHttpRequest: (request: { url: string; options: any; requestId: string }) =>
|
||||
ipcRenderer.invoke('lx-music-http-request', request),
|
||||
|
||||
lxMusicHttpCancel: (requestId: string) => ipcRenderer.invoke('lx-music-http-cancel', requestId)
|
||||
};
|
||||
|
||||
// 创建带类型的ipcRenderer对象,暴露给渲染进程
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<n-message-provider>
|
||||
<router-view></router-view>
|
||||
<traffic-warning-drawer v-if="!isElectron"></traffic-warning-drawer>
|
||||
<disclaimer-modal></disclaimer-modal>
|
||||
</n-message-provider>
|
||||
</n-dialog-provider>
|
||||
</n-config-provider>
|
||||
@@ -18,22 +19,24 @@ import { computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import DisclaimerModal from '@/components/common/DisclaimerModal.vue';
|
||||
import TrafficWarningDrawer from '@/components/TrafficWarningDrawer.vue';
|
||||
import homeRouter from '@/router/home';
|
||||
import { useMenuStore } from '@/store/modules/menu';
|
||||
import { usePlayerStore } from '@/store/modules/player';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { isElectron, isLyricWindow } from '@/utils';
|
||||
import { checkLoginStatus } from '@/utils/auth';
|
||||
|
||||
import { initAudioListeners, initMusicHook } from './hooks/MusicHook';
|
||||
import { audioService } from './services/audioService';
|
||||
import { initLxMusicRunner } from './services/LxMusicSourceRunner';
|
||||
import { isMobile } from './utils';
|
||||
import { useAppShortcuts } from './utils/appShortcuts';
|
||||
|
||||
const { locale } = useI18n();
|
||||
const settingsStore = useSettingsStore();
|
||||
const menuStore = useMenuStore();
|
||||
const playerStore = usePlayerStore();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
// 监听语言变化
|
||||
@@ -75,8 +78,16 @@ if (!isLyricWindow.value) {
|
||||
settingsStore.initializeSettings();
|
||||
settingsStore.initializeTheme();
|
||||
settingsStore.initializeSystemFonts();
|
||||
if (isMobile.value) {
|
||||
menuStore.setMenus(homeRouter.filter((item) => item.meta.isMobile));
|
||||
|
||||
// 初始化登录状态 - 从 localStorage 恢复用户信息和登录类型
|
||||
const loginInfo = checkLoginStatus();
|
||||
if (loginInfo.isLoggedIn) {
|
||||
if (loginInfo.user && !userStore.user) {
|
||||
userStore.setUser(loginInfo.user);
|
||||
}
|
||||
if (loginInfo.loginType && !userStore.loginType) {
|
||||
userStore.setLoginType(loginInfo.loginType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +119,7 @@ if (isElectron) {
|
||||
useAppShortcuts();
|
||||
|
||||
onMounted(async () => {
|
||||
playerStore.setIsPlay(false);
|
||||
if (isLyricWindow.value) {
|
||||
return;
|
||||
}
|
||||
@@ -116,6 +128,21 @@ onMounted(async () => {
|
||||
// 初始化播放状态
|
||||
await playerStore.initializePlayState();
|
||||
|
||||
// 初始化落雪音源(如果有激活的音源)
|
||||
const activeLxApiId = settingsStore.setData?.activeLxMusicApiId;
|
||||
if (activeLxApiId) {
|
||||
const lxMusicScripts = settingsStore.setData?.lxMusicScripts || [];
|
||||
const activeScript = lxMusicScripts.find((script: any) => script.id === activeLxApiId);
|
||||
if (activeScript && activeScript.script) {
|
||||
try {
|
||||
console.log('[App] 初始化激活的落雪音源:', activeScript.name);
|
||||
await initLxMusicRunner(activeScript.script);
|
||||
} catch (error) {
|
||||
console.error('[App] 初始化落雪音源失败:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有正在播放的音乐,则初始化音频监听器
|
||||
if (playerStore.playMusic && playerStore.playMusic.id) {
|
||||
// 使用 nextTick 确保 DOM 更新后再初始化
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { IBilibiliPlayUrl, IBilibiliVideoDetail } from '@/types/bilibili';
|
||||
import type { IBilibiliPage, IBilibiliPlayUrl, IBilibiliVideoDetail } from '@/types/bilibili';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getSetData, isElectron } from '@/utils';
|
||||
import request from '@/utils/request';
|
||||
|
||||
@@ -10,14 +11,50 @@ interface ISearchParams {
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索B站视频
|
||||
* 搜索B站视频(带自动重试)
|
||||
* 最多重试10次,每次间隔100ms
|
||||
* @param params 搜索参数
|
||||
*/
|
||||
export const searchBilibili = (params: ISearchParams) => {
|
||||
export const searchBilibili = async (params: ISearchParams): Promise<any> => {
|
||||
console.log('调用B站搜索API,参数:', params);
|
||||
return request.get('/bilibili/search', {
|
||||
params
|
||||
});
|
||||
const maxRetries = 10;
|
||||
const delayMs = 100;
|
||||
const delay = (ms: number) => new Promise((res) => setTimeout(res, ms));
|
||||
|
||||
let lastError: unknown = null;
|
||||
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
||||
try {
|
||||
const response = await request.get('/bilibili/search', { params });
|
||||
console.log('B站搜索API响应:', response);
|
||||
const hasTitle = Boolean(response?.data?.data?.result?.length);
|
||||
if (response?.status === 200 && hasTitle) {
|
||||
return response;
|
||||
}
|
||||
|
||||
lastError = new Error(
|
||||
`搜索结果不符合成功条件(缺少 data.title ) (attempt ${attempt}/${maxRetries})`
|
||||
);
|
||||
console.warn('B站搜索API响应不符合要求,将重试。调试信息:', {
|
||||
status: response?.status,
|
||||
hasData: Boolean(response?.data),
|
||||
hasInnerData: Boolean(response?.data?.data),
|
||||
title: response?.data?.data?.title
|
||||
});
|
||||
} catch (error) {
|
||||
lastError = error;
|
||||
console.warn(`B站搜索API错误[第${attempt}次],将重试:`, error);
|
||||
}
|
||||
|
||||
if (attempt === maxRetries) {
|
||||
console.error('B站搜索API重试达到上限,仍然失败');
|
||||
if (lastError instanceof Error) throw lastError;
|
||||
throw new Error('B站搜索失败且达到最大重试次数');
|
||||
}
|
||||
|
||||
await delay(delayMs);
|
||||
}
|
||||
// 理论上不会到达这里,添加以满足TS控制流分析
|
||||
throw new Error('B站搜索在重试后未返回有效结果');
|
||||
};
|
||||
|
||||
interface IBilibiliResponse<T> {
|
||||
@@ -139,7 +176,7 @@ export const getBilibiliAudioUrl = async (bvid: string, cid: number): Promise<st
|
||||
let url = '';
|
||||
|
||||
if (playUrlData.dash && playUrlData.dash.audio && playUrlData.dash.audio.length > 0) {
|
||||
url = playUrlData.dash.audio[0].baseUrl;
|
||||
url = playUrlData.dash.audio[playUrlData.dash.audio.length - 1].baseUrl;
|
||||
} else if (playUrlData.durl && playUrlData.durl.length > 0) {
|
||||
url = playUrlData.durl[0].url;
|
||||
} else {
|
||||
@@ -158,6 +195,9 @@ export const searchAndGetBilibiliAudioUrl = async (keyword: string): Promise<str
|
||||
try {
|
||||
// 搜索B站视频,取第一页第一个结果
|
||||
const res = await searchBilibili({ keyword, page: 1, pagesize: 1 });
|
||||
if (!res) {
|
||||
throw new Error('B站搜索返回为空');
|
||||
}
|
||||
const result = res.data?.data?.result;
|
||||
if (!result || result.length === 0) {
|
||||
throw new Error('未找到相关B站视频');
|
||||
@@ -178,3 +218,227 @@ export const searchAndGetBilibiliAudioUrl = async (keyword: string): Promise<str
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 解析B站ID格式
|
||||
* @param biliId B站ID,可能是字符串格式(bvid--pid--cid)
|
||||
* @returns 解析后的对象 {bvid, pid, cid} 或 null
|
||||
*/
|
||||
export const parseBilibiliId = (
|
||||
biliId: string | number
|
||||
): { bvid: string; pid: string; cid: number } | null => {
|
||||
const strBiliId = String(biliId);
|
||||
|
||||
if (strBiliId.includes('--')) {
|
||||
const [bvid, pid, cid] = strBiliId.split('--');
|
||||
if (!bvid || !pid || !cid) {
|
||||
console.warn(`B站ID格式错误: ${strBiliId}, 正确格式应为 bvid--pid--cid`);
|
||||
return null;
|
||||
}
|
||||
return { bvid, pid, cid: Number(cid) };
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建默认的Artist对象
|
||||
* @param name 艺术家名称
|
||||
* @param id 艺术家ID
|
||||
* @returns Artist对象
|
||||
*/
|
||||
const createDefaultArtist = (name: string, id: number = 0) => ({
|
||||
name,
|
||||
id,
|
||||
picId: 0,
|
||||
img1v1Id: 0,
|
||||
briefDesc: '',
|
||||
img1v1Url: '',
|
||||
albumSize: 0,
|
||||
alias: [],
|
||||
trans: '',
|
||||
musicSize: 0,
|
||||
topicPerson: 0,
|
||||
picUrl: ''
|
||||
});
|
||||
|
||||
/**
|
||||
* 创建默认的Album对象
|
||||
* @param name 专辑名称
|
||||
* @param picUrl 专辑图片URL
|
||||
* @param artistName 艺术家名称
|
||||
* @param artistId 艺术家ID
|
||||
* @returns Album对象
|
||||
*/
|
||||
const createDefaultAlbum = (
|
||||
name: string,
|
||||
picUrl: string,
|
||||
artistName: string,
|
||||
artistId: number = 0
|
||||
) => ({
|
||||
name,
|
||||
picUrl,
|
||||
id: 0,
|
||||
type: '',
|
||||
size: 0,
|
||||
picId: 0,
|
||||
blurPicUrl: '',
|
||||
companyId: 0,
|
||||
pic: 0,
|
||||
publishTime: 0,
|
||||
description: '',
|
||||
tags: '',
|
||||
company: '',
|
||||
briefDesc: '',
|
||||
artist: createDefaultArtist(artistName, artistId),
|
||||
songs: [],
|
||||
alias: [],
|
||||
status: 0,
|
||||
copyrightId: 0,
|
||||
commentThreadId: '',
|
||||
artists: [],
|
||||
subType: '',
|
||||
transName: null,
|
||||
onSale: false,
|
||||
mark: 0,
|
||||
picId_str: ''
|
||||
});
|
||||
|
||||
/**
|
||||
* 创建基础的B站SongResult对象
|
||||
* @param config 配置对象
|
||||
* @returns SongResult对象
|
||||
*/
|
||||
const createBaseBilibiliSong = (config: {
|
||||
id: string | number;
|
||||
name: string;
|
||||
picUrl: string;
|
||||
artistName: string;
|
||||
artistId?: number;
|
||||
albumName: string;
|
||||
bilibiliData?: { bvid: string; cid: number };
|
||||
playMusicUrl?: string;
|
||||
duration?: number;
|
||||
}): SongResult => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
picUrl,
|
||||
artistName,
|
||||
artistId = 0,
|
||||
albumName,
|
||||
bilibiliData,
|
||||
playMusicUrl,
|
||||
duration
|
||||
} = config;
|
||||
|
||||
const baseResult: SongResult = {
|
||||
id,
|
||||
name,
|
||||
picUrl,
|
||||
ar: [createDefaultArtist(artistName, artistId)],
|
||||
al: createDefaultAlbum(albumName, picUrl, artistName, artistId),
|
||||
count: 0,
|
||||
source: 'bilibili' as const
|
||||
};
|
||||
|
||||
if (bilibiliData) {
|
||||
baseResult.bilibiliData = bilibiliData;
|
||||
}
|
||||
|
||||
if (playMusicUrl) {
|
||||
baseResult.playMusicUrl = playMusicUrl;
|
||||
}
|
||||
|
||||
if (duration !== undefined) {
|
||||
baseResult.duration = duration;
|
||||
}
|
||||
|
||||
return baseResult as SongResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* 从B站视频详情和分P信息创建SongResult对象
|
||||
* @param videoDetail B站视频详情
|
||||
* @param page 分P信息
|
||||
* @param bvid B站视频ID
|
||||
* @returns SongResult对象
|
||||
*/
|
||||
export const createSongFromBilibiliVideo = (
|
||||
videoDetail: IBilibiliVideoDetail,
|
||||
page: IBilibiliPage,
|
||||
bvid: string
|
||||
): SongResult => {
|
||||
const pageName = page.part || '';
|
||||
const title = `${pageName} - ${videoDetail.title}`;
|
||||
const songId = `${bvid}--${page.page}--${page.cid}`;
|
||||
const picUrl = getBilibiliProxyUrl(videoDetail.pic);
|
||||
|
||||
return createBaseBilibiliSong({
|
||||
id: songId,
|
||||
name: title,
|
||||
picUrl,
|
||||
artistName: videoDetail.owner.name,
|
||||
artistId: videoDetail.owner.mid,
|
||||
albumName: videoDetail.title,
|
||||
bilibiliData: {
|
||||
bvid,
|
||||
cid: page.cid
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建简化的SongResult对象(用于搜索结果直接播放)
|
||||
* @param item 搜索结果项
|
||||
* @param audioUrl 音频URL
|
||||
* @returns SongResult对象
|
||||
*/
|
||||
export const createSimpleBilibiliSong = (item: any, audioUrl: string): SongResult => {
|
||||
const duration = typeof item.duration === 'string' ? 0 : item.duration * 1000; // 转换为毫秒
|
||||
|
||||
return createBaseBilibiliSong({
|
||||
id: item.id,
|
||||
name: item.title,
|
||||
picUrl: item.pic,
|
||||
artistName: item.author,
|
||||
albumName: item.title,
|
||||
playMusicUrl: audioUrl,
|
||||
duration
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量处理B站视频,从ID列表获取SongResult列表
|
||||
* @param bilibiliIds B站ID列表
|
||||
* @returns SongResult列表
|
||||
*/
|
||||
export const processBilibiliVideos = async (
|
||||
bilibiliIds: (string | number)[]
|
||||
): Promise<SongResult[]> => {
|
||||
const bilibiliSongs: SongResult[] = [];
|
||||
|
||||
for (const biliId of bilibiliIds) {
|
||||
const parsedId = parseBilibiliId(biliId);
|
||||
if (!parsedId) continue;
|
||||
|
||||
try {
|
||||
const res = await getBilibiliVideoDetail(parsedId.bvid);
|
||||
const videoDetail = res.data;
|
||||
|
||||
// 找到对应的分P
|
||||
const page = videoDetail.pages.find((p) => p.cid === parsedId.cid);
|
||||
if (!page) {
|
||||
console.warn(`未找到对应的分P: cid=${parsedId.cid}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const songData = createSongFromBilibiliVideo(videoDetail, page, parsedId.bvid);
|
||||
bilibiliSongs.push(songData);
|
||||
} catch (error) {
|
||||
console.error(`获取B站视频详情失败 (${biliId}):`, error);
|
||||
}
|
||||
}
|
||||
|
||||
return bilibiliSongs;
|
||||
};
|
||||
|
||||
273
src/renderer/api/lxMusicStrategy.ts
Normal file
273
src/renderer/api/lxMusicStrategy.ts
Normal file
@@ -0,0 +1,273 @@
|
||||
/**
|
||||
* 落雪音乐 (LX Music) 音源解析策略
|
||||
*
|
||||
* 实现 MusicSourceStrategy 接口,作为落雪音源的解析入口
|
||||
*/
|
||||
|
||||
import { getLxMusicRunner, initLxMusicRunner } from '@/services/LxMusicSourceRunner';
|
||||
import { useSettingsStore } from '@/store';
|
||||
import type { LxMusicInfo, LxQuality, LxSourceKey } from '@/types/lxMusic';
|
||||
import { LX_SOURCE_NAMES, QUALITY_TO_LX } from '@/types/lxMusic';
|
||||
import type { SongResult } from '@/types/music';
|
||||
|
||||
import type { MusicParseResult } from './musicParser';
|
||||
import { CacheManager } from './musicParser';
|
||||
|
||||
/**
|
||||
* 解析可能是 API 端点的 URL,获取真实音频 URL
|
||||
* 一些音源脚本返回的是 API 端点,需要额外请求才能获取真实音频 URL
|
||||
*/
|
||||
const resolveAudioUrl = async (url: string): Promise<string> => {
|
||||
try {
|
||||
// 检查是否看起来像 API 端点(包含 /api/ 且有查询参数)
|
||||
const isApiEndpoint = url.includes('/api/') || (url.includes('?') && url.includes('type=url'));
|
||||
|
||||
if (!isApiEndpoint) {
|
||||
// 看起来像直接的音频 URL,直接返回
|
||||
return url;
|
||||
}
|
||||
|
||||
console.log('[LxMusicStrategy] 检测到 API 端点,尝试解析真实 URL:', url);
|
||||
|
||||
// 尝试获取真实 URL
|
||||
const response = await fetch(url, {
|
||||
method: 'HEAD',
|
||||
redirect: 'manual' // 不自动跟随重定向
|
||||
});
|
||||
|
||||
// 检查是否是重定向
|
||||
if (response.status >= 300 && response.status < 400) {
|
||||
const location = response.headers.get('Location');
|
||||
if (location) {
|
||||
console.log('[LxMusicStrategy] API 返回重定向 URL:', location);
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果 HEAD 请求没有重定向,尝试 GET 请求
|
||||
const getResponse = await fetch(url, {
|
||||
redirect: 'follow'
|
||||
});
|
||||
|
||||
// 检查 Content-Type
|
||||
const contentType = getResponse.headers.get('Content-Type') || '';
|
||||
|
||||
// 如果是音频类型,返回最终 URL
|
||||
if (contentType.includes('audio/') || contentType.includes('application/octet-stream')) {
|
||||
console.log('[LxMusicStrategy] 解析到音频 URL:', getResponse.url);
|
||||
return getResponse.url;
|
||||
}
|
||||
|
||||
// 如果是 JSON,尝试解析
|
||||
if (contentType.includes('application/json') || contentType.includes('text/json')) {
|
||||
const json = await getResponse.json();
|
||||
console.log('[LxMusicStrategy] API 返回 JSON:', json);
|
||||
|
||||
// 尝试从 JSON 中提取 URL(常见字段)
|
||||
const audioUrl = json.url || json.data?.url || json.audio_url || json.link || json.src;
|
||||
if (audioUrl && typeof audioUrl === 'string') {
|
||||
console.log('[LxMusicStrategy] 从 JSON 中提取音频 URL:', audioUrl);
|
||||
return audioUrl;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果都不是,返回原始 URL(可能直接可用)
|
||||
console.warn('[LxMusicStrategy] 无法解析 API 端点,返回原始 URL');
|
||||
return url;
|
||||
} catch (error) {
|
||||
console.error('[LxMusicStrategy] URL 解析失败:', error);
|
||||
// 解析失败时返回原始 URL
|
||||
return url;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 将 SongResult 转换为 LxMusicInfo 格式
|
||||
*/
|
||||
const convertToLxMusicInfo = (songResult: SongResult): LxMusicInfo => {
|
||||
const artistName =
|
||||
songResult.ar && songResult.ar.length > 0
|
||||
? songResult.ar.map((a) => a.name).join('、')
|
||||
: songResult.artists && songResult.artists.length > 0
|
||||
? songResult.artists.map((a) => a.name).join('、')
|
||||
: '';
|
||||
|
||||
const albumName = songResult.al?.name || (songResult.album as any)?.name || '';
|
||||
|
||||
const albumId = songResult.al?.id || (songResult.album as any)?.id || '';
|
||||
|
||||
// 计算时长(秒转分钟:秒格式)
|
||||
const duration = songResult.dt || songResult.duration || 0;
|
||||
const minutes = Math.floor(duration / 60000);
|
||||
const seconds = Math.floor((duration % 60000) / 1000);
|
||||
const interval = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
||||
|
||||
return {
|
||||
songmid: songResult.id,
|
||||
name: songResult.name,
|
||||
singer: artistName,
|
||||
album: albumName,
|
||||
albumId,
|
||||
source: 'wy', // 默认使用网易云作为源,因为我们的数据来自网易云
|
||||
interval,
|
||||
img: songResult.picUrl || songResult.al?.picUrl || ''
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取最佳匹配的落雪音源
|
||||
* 因为我们的数据来自网易云,优先尝试 wy 音源
|
||||
*/
|
||||
const getBestMatchingSource = (
|
||||
availableSources: LxSourceKey[],
|
||||
_songSource?: string
|
||||
): LxSourceKey | null => {
|
||||
// 优先级顺序:网易云 > 酷我 > 咪咕 > 酷狗 > QQ音乐
|
||||
const priority: LxSourceKey[] = ['wy', 'kw', 'mg', 'kg', 'tx'];
|
||||
|
||||
for (const source of priority) {
|
||||
if (availableSources.includes(source)) {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
return availableSources[0] || null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 落雪音乐解析策略
|
||||
*/
|
||||
export class LxMusicStrategy {
|
||||
name = 'lxMusic';
|
||||
priority = 0; // 最高优先级
|
||||
|
||||
/**
|
||||
* 检查是否可以处理
|
||||
*/
|
||||
canHandle(sources: string[], settingsStore?: any): boolean {
|
||||
// 检查是否启用了落雪音源
|
||||
if (!sources.includes('lxMusic')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查是否有激活的音源
|
||||
const activeLxApiId = settingsStore?.setData?.activeLxMusicApiId;
|
||||
if (!activeLxApiId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查音源列表中是否存在该 ID
|
||||
const lxMusicScripts = settingsStore?.setData?.lxMusicScripts || [];
|
||||
const activeScript = lxMusicScripts.find((script: any) => script.id === activeLxApiId);
|
||||
|
||||
return Boolean(activeScript && activeScript.script);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析音乐 URL
|
||||
*/
|
||||
async parse(
|
||||
id: number,
|
||||
data: SongResult,
|
||||
quality?: string,
|
||||
_sources?: string[]
|
||||
): Promise<MusicParseResult | null> {
|
||||
// 检查失败缓存
|
||||
if (CacheManager.isInFailedCache(id, this.name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
// 获取激活的音源 ID
|
||||
const activeLxApiId = settingsStore.setData?.activeLxMusicApiId;
|
||||
if (!activeLxApiId) {
|
||||
console.log('[LxMusicStrategy] 未选择激活的落雪音源');
|
||||
return null;
|
||||
}
|
||||
|
||||
// 从音源列表中获取激活的脚本
|
||||
const lxMusicScripts = settingsStore.setData?.lxMusicScripts || [];
|
||||
const activeScript = lxMusicScripts.find((script: any) => script.id === activeLxApiId);
|
||||
|
||||
if (!activeScript || !activeScript.script) {
|
||||
console.log('[LxMusicStrategy] 未找到激活的落雪音源脚本');
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(`[LxMusicStrategy] 使用激活的音源: ${activeScript.name} (ID: ${activeScript.id})`);
|
||||
|
||||
// 获取或初始化执行器
|
||||
let runner = getLxMusicRunner();
|
||||
if (!runner || !runner.isInitialized()) {
|
||||
console.log('[LxMusicStrategy] 初始化落雪音源执行器...');
|
||||
runner = await initLxMusicRunner(activeScript.script);
|
||||
}
|
||||
|
||||
// 获取可用音源
|
||||
const sources = runner.getSources();
|
||||
const availableSourceKeys = Object.keys(sources) as LxSourceKey[];
|
||||
|
||||
if (availableSourceKeys.length === 0) {
|
||||
console.log('[LxMusicStrategy] 没有可用的落雪音源');
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
|
||||
// 选择最佳音源
|
||||
const bestSource = getBestMatchingSource(availableSourceKeys);
|
||||
if (!bestSource) {
|
||||
console.log('[LxMusicStrategy] 无法找到匹配的音源');
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(`[LxMusicStrategy] 使用音源: ${LX_SOURCE_NAMES[bestSource]} (${bestSource})`);
|
||||
|
||||
// 转换歌曲信息
|
||||
const lxMusicInfo = convertToLxMusicInfo(data);
|
||||
|
||||
// 转换音质
|
||||
const lxQuality: LxQuality = QUALITY_TO_LX[quality || 'higher'] || '320k';
|
||||
|
||||
// 获取音乐 URL
|
||||
const rawUrl = await runner.getMusicUrl(bestSource, lxMusicInfo, lxQuality);
|
||||
|
||||
if (!rawUrl) {
|
||||
console.log('[LxMusicStrategy] 获取 URL 失败');
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log('[LxMusicStrategy] 脚本返回 URL:', rawUrl.substring(0, 80) + '...');
|
||||
|
||||
// 解析可能是 API 端点的 URL
|
||||
const resolvedUrl = await resolveAudioUrl(rawUrl);
|
||||
|
||||
if (!resolvedUrl) {
|
||||
console.log('[LxMusicStrategy] URL 解析失败');
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log('[LxMusicStrategy] 最终音频 URL:', resolvedUrl.substring(0, 80) + '...');
|
||||
|
||||
return {
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: {
|
||||
url: resolvedUrl,
|
||||
source: `lx-${bestSource}`,
|
||||
quality: lxQuality
|
||||
}
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('[LxMusicStrategy] 解析失败:', error);
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,10 @@
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
import { musicDB } from '@/hooks/MusicHook';
|
||||
import { useSettingsStore, useUserStore } from '@/store';
|
||||
import type { ILyric } from '@/types/lyric';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { isElectron } from '@/utils';
|
||||
import request from '@/utils/request';
|
||||
import requestMusic from '@/utils/request_music';
|
||||
|
||||
import { searchAndGetBilibiliAudioUrl } from './bilibili';
|
||||
import { parseFromGDMusic } from './gdmusic';
|
||||
import { MusicParser, type MusicParseResult } from './musicParser';
|
||||
|
||||
const { addData, getData, deleteData } = musicDB;
|
||||
|
||||
@@ -30,6 +25,8 @@ export const getMusicUrl = async (id: number, isDownloaded: boolean = false) =>
|
||||
params: {
|
||||
id,
|
||||
level: settingStore.setData.musicQuality || 'higher',
|
||||
encodeType: settingStore.setData.musicQuality == 'lossless' ? 'aac' : 'flac',
|
||||
// level为lossless时,encodeType=flac时网易云会返回hires音质,encodeType=aac时网易云会返回lossless音质
|
||||
cookie: `${localStorage.getItem('token')} os=pc;`
|
||||
}
|
||||
});
|
||||
@@ -45,7 +42,8 @@ export const getMusicUrl = async (id: number, isDownloaded: boolean = false) =>
|
||||
return await request.get('/song/url/v1', {
|
||||
params: {
|
||||
id,
|
||||
level: settingStore.setData.musicQuality || 'higher'
|
||||
level: settingStore.setData.musicQuality || 'higher',
|
||||
encodeType: settingStore.setData.musicQuality == 'lossless' ? 'aac' : 'flac'
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -67,7 +65,7 @@ export const getMusicLrc = async (id: number) => {
|
||||
}
|
||||
|
||||
// 获取新的歌词数据
|
||||
const res = await request.get<ILyric>('/lyric', { params: { id } });
|
||||
const res = await request.get<ILyric>('/lyric/new', { params: { id } });
|
||||
|
||||
// 只有在成功获取新数据后才删除旧缓存并添加新缓存
|
||||
if (res?.data) {
|
||||
@@ -84,121 +82,17 @@ export const getMusicLrc = async (id: number) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 从Bilibili获取音频URL
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果
|
||||
*/
|
||||
const getBilibiliAudio = async (data: SongResult) => {
|
||||
const songName = data?.name || '';
|
||||
const artistName =
|
||||
Array.isArray(data?.ar) && data.ar.length > 0 && data.ar[0]?.name ? data.ar[0].name : '';
|
||||
const albumName = data?.al && typeof data.al === 'object' && data.al?.name ? data.al.name : '';
|
||||
|
||||
const searchQuery = [songName, artistName, albumName].filter(Boolean).join(' ').trim();
|
||||
console.log('开始搜索bilibili音频:', searchQuery);
|
||||
|
||||
const url = await searchAndGetBilibiliAudioUrl(searchQuery);
|
||||
return {
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: { url }
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 从GD音乐台获取音频URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果,失败时返回null
|
||||
*/
|
||||
const getGDMusicAudio = async (id: number, data: SongResult) => {
|
||||
try {
|
||||
const gdResult = await parseFromGDMusic(id, data, '999');
|
||||
if (gdResult) {
|
||||
return gdResult;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('GD音乐台解析失败:', error);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 使用unblockMusic解析音频URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @param sources 音源列表
|
||||
* @returns 解析结果
|
||||
*/
|
||||
const getUnblockMusicAudio = (id: number, data: SongResult, sources: any[]) => {
|
||||
const filteredSources = sources.filter((source) => source !== 'gdmusic');
|
||||
console.log(`使用unblockMusic解析,音源:`, filteredSources);
|
||||
return window.api.unblockMusic(id, cloneDeep(data), cloneDeep(filteredSources));
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取解析后的音乐URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果
|
||||
*/
|
||||
export const getParsingMusicUrl = async (id: number, data: SongResult) => {
|
||||
const settingStore = useSettingsStore();
|
||||
|
||||
// 如果禁用了音乐解析功能,则直接返回空结果
|
||||
if (!settingStore.setData.enableMusicUnblock) {
|
||||
return Promise.resolve({ data: { code: 404, message: '音乐解析功能已禁用' } });
|
||||
}
|
||||
|
||||
// 1. 确定使用的音源列表(自定义或全局)
|
||||
const songId = String(id);
|
||||
const savedSourceStr = localStorage.getItem(`song_source_${songId}`);
|
||||
let musicSources: any[] = [];
|
||||
|
||||
try {
|
||||
if (savedSourceStr) {
|
||||
// 使用自定义音源
|
||||
musicSources = JSON.parse(savedSourceStr);
|
||||
console.log(`使用歌曲 ${id} 自定义音源:`, musicSources);
|
||||
} else {
|
||||
// 使用全局音源设置
|
||||
musicSources = settingStore.setData.enabledMusicSources || [];
|
||||
console.log(`使用全局音源设置:`, musicSources);
|
||||
if (isElectron && musicSources.length > 0) {
|
||||
return getUnblockMusicAudio(id, data, musicSources);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('解析音源设置失败,使用全局设置', e);
|
||||
musicSources = settingStore.setData.enabledMusicSources || [];
|
||||
}
|
||||
|
||||
// 2. 按优先级解析
|
||||
|
||||
// 2.1 Bilibili解析(优先级最高)
|
||||
if (musicSources.includes('bilibili')) {
|
||||
return await getBilibiliAudio(data);
|
||||
}
|
||||
|
||||
// 2.2 GD音乐台解析
|
||||
if (musicSources.includes('gdmusic')) {
|
||||
const gdResult = await getGDMusicAudio(id, data);
|
||||
if (gdResult) return gdResult;
|
||||
// GD解析失败,继续下一步
|
||||
console.log('GD音乐台解析失败,尝试使用其他音源');
|
||||
}
|
||||
console.log('musicSources', musicSources);
|
||||
// 2.3 使用unblockMusic解析其他音源
|
||||
if (isElectron && musicSources.length > 0) {
|
||||
return getUnblockMusicAudio(id, data, musicSources);
|
||||
}
|
||||
|
||||
// 3. 后备方案:使用API请求
|
||||
console.log('无可用音源或不在Electron环境中,使用API请求');
|
||||
return requestMusic.get<any>('/music', { params: { id } });
|
||||
export const getParsingMusicUrl = async (
|
||||
id: number,
|
||||
data: SongResult
|
||||
): Promise<MusicParseResult> => {
|
||||
return await MusicParser.parseMusic(id, data);
|
||||
};
|
||||
|
||||
// 收藏歌曲
|
||||
@@ -206,6 +100,12 @@ export const likeSong = (id: number, like: boolean = true) => {
|
||||
return request.get('/like', { params: { id, like } });
|
||||
};
|
||||
|
||||
// 将每日推荐中的歌曲标记为不感兴趣,并获取一首新歌
|
||||
export const dislikeRecommendedSong = (id: number | string) => {
|
||||
return request.get('/recommend/songs/dislike', {
|
||||
params: { id }
|
||||
});
|
||||
};
|
||||
// 获取用户喜欢的音乐列表
|
||||
export const getLikedList = (uid: number) => {
|
||||
return request.get('/likelist', {
|
||||
@@ -276,3 +176,49 @@ export function subscribePlaylist(params: { t: number; id: number }) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏/取消收藏专辑
|
||||
* @param params t: 1 收藏, 2 取消收藏; id: 专辑id
|
||||
*/
|
||||
export function subscribeAlbum(params: { t: number; id: number }) {
|
||||
return request({
|
||||
url: '/album/sub',
|
||||
method: 'post',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史日推可用日期列表
|
||||
*/
|
||||
export function getHistoryRecommendDates() {
|
||||
return request({
|
||||
url: '/history/recommend/songs',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史日推详情数据
|
||||
* @param date 日期,格式:YYYY-MM-DD
|
||||
*/
|
||||
export function getHistoryRecommendSongs(date: string) {
|
||||
return request({
|
||||
url: '/history/recommend/songs/detail',
|
||||
method: 'get',
|
||||
params: { date }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 心动模式/智能播放
|
||||
* @param params id: 歌曲id, pid: 歌单id, sid: 要开始播放的歌曲id(可选)
|
||||
*/
|
||||
export function getIntelligenceList(params: { id: number; pid: number; sid?: number }) {
|
||||
return request({
|
||||
url: '/playmode/intelligence/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
684
src/renderer/api/musicParser.ts
Normal file
684
src/renderer/api/musicParser.ts
Normal file
@@ -0,0 +1,684 @@
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
import { musicDB } from '@/hooks/MusicHook';
|
||||
import { SongSourceConfigManager } from '@/services/SongSourceConfigManager';
|
||||
import { useSettingsStore } from '@/store';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { isElectron } from '@/utils';
|
||||
import requestMusic from '@/utils/request_music';
|
||||
|
||||
import { searchAndGetBilibiliAudioUrl } from './bilibili';
|
||||
import type { ParsedMusicResult } from './gdmusic';
|
||||
import { parseFromGDMusic } from './gdmusic';
|
||||
import { LxMusicStrategy } from './lxMusicStrategy';
|
||||
import { parseFromCustomApi } from './parseFromCustomApi';
|
||||
|
||||
const { saveData, getData, deleteData } = musicDB;
|
||||
|
||||
/**
|
||||
* 音乐解析结果接口
|
||||
*/
|
||||
export interface MusicParseResult {
|
||||
data: {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
url: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存配置
|
||||
*/
|
||||
const CACHE_CONFIG = {
|
||||
// 音乐URL缓存时间:30分钟
|
||||
MUSIC_URL_CACHE_TIME: 30 * 60 * 1000,
|
||||
// 失败缓存时间:1分钟(减少到 1 分钟以便更快恢复)
|
||||
FAILED_CACHE_TIME: 1 * 60 * 1000,
|
||||
// 重试配置
|
||||
MAX_RETRY_COUNT: 2,
|
||||
RETRY_DELAY: 1000
|
||||
};
|
||||
|
||||
/**
|
||||
* 内存失败缓存(替代 IndexedDB,更轻量且应用重启后自动失效)
|
||||
*/
|
||||
const failedCacheMap = new Map<string, number>();
|
||||
|
||||
/**
|
||||
* 缓存管理器
|
||||
*/
|
||||
export class CacheManager {
|
||||
/**
|
||||
* 获取缓存的音乐URL
|
||||
*/
|
||||
static async getCachedMusicUrl(
|
||||
id: number,
|
||||
musicSources?: string[]
|
||||
): Promise<MusicParseResult | null> {
|
||||
try {
|
||||
const cached = await getData('music_url_cache', id);
|
||||
if (
|
||||
cached?.createTime &&
|
||||
Date.now() - cached.createTime < CACHE_CONFIG.MUSIC_URL_CACHE_TIME
|
||||
) {
|
||||
// 检查缓存的音源配置是否与当前配置一致
|
||||
const cachedSources = cached.musicSources || [];
|
||||
const currentSources = musicSources || [];
|
||||
|
||||
// 如果音源配置不一致,清除缓存
|
||||
if (JSON.stringify(cachedSources.sort()) !== JSON.stringify(currentSources.sort())) {
|
||||
console.log(`音源配置已变更,清除歌曲 ${id} 的缓存`);
|
||||
await deleteData('music_url_cache', id);
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(`使用缓存的音乐URL: ${id}`);
|
||||
return cached.data;
|
||||
}
|
||||
// 清理过期缓存
|
||||
if (cached) {
|
||||
await deleteData('music_url_cache', id);
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('获取缓存失败:', error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存音乐URL
|
||||
*/
|
||||
static async setCachedMusicUrl(
|
||||
id: number,
|
||||
result: MusicParseResult,
|
||||
musicSources?: string[]
|
||||
): Promise<void> {
|
||||
try {
|
||||
// 深度克隆数据,确保可以被 IndexedDB 存储
|
||||
await saveData('music_url_cache', {
|
||||
id,
|
||||
data: cloneDeep(result),
|
||||
musicSources: cloneDeep(musicSources || []),
|
||||
createTime: Date.now()
|
||||
});
|
||||
console.log(`缓存音乐URL成功: ${id}`);
|
||||
} catch (error) {
|
||||
console.error('缓存音乐URL失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否在失败缓存期内(使用内存缓存)
|
||||
*/
|
||||
static isInFailedCache(id: number, strategyName: string): boolean {
|
||||
const cacheKey = `${id}_${strategyName}`;
|
||||
const cachedTime = failedCacheMap.get(cacheKey);
|
||||
if (cachedTime && Date.now() - cachedTime < CACHE_CONFIG.FAILED_CACHE_TIME) {
|
||||
console.log(`策略 ${strategyName} 在失败缓存期内,跳过`);
|
||||
return true;
|
||||
}
|
||||
// 清理过期缓存
|
||||
if (cachedTime) {
|
||||
failedCacheMap.delete(cacheKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加失败缓存(使用内存缓存)
|
||||
*/
|
||||
static addFailedCache(id: number, strategyName: string): void {
|
||||
const cacheKey = `${id}_${strategyName}`;
|
||||
failedCacheMap.set(cacheKey, Date.now());
|
||||
console.log(
|
||||
`添加失败缓存成功: ${strategyName} (缓存时间: ${CACHE_CONFIG.FAILED_CACHE_TIME / 1000}秒)`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除指定歌曲的失败缓存
|
||||
*/
|
||||
static clearFailedCache(id: number): void {
|
||||
const keysToDelete: string[] = [];
|
||||
failedCacheMap.forEach((_, key) => {
|
||||
if (key.startsWith(`${id}_`)) {
|
||||
keysToDelete.push(key);
|
||||
}
|
||||
});
|
||||
keysToDelete.forEach((key) => failedCacheMap.delete(key));
|
||||
if (keysToDelete.length > 0) {
|
||||
console.log(`清除歌曲 ${id} 的失败缓存: ${keysToDelete.length} 项`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除指定歌曲的所有缓存
|
||||
*/
|
||||
static async clearMusicCache(id: number): Promise<void> {
|
||||
try {
|
||||
// 清除URL缓存
|
||||
await deleteData('music_url_cache', id);
|
||||
console.log(`清除歌曲 ${id} 的URL缓存`);
|
||||
|
||||
// 清除失败缓存 - 需要遍历所有策略
|
||||
const strategies = ['custom', 'bilibili', 'gdmusic', 'unblockMusic'];
|
||||
for (const strategy of strategies) {
|
||||
const cacheKey = `${id}_${strategy}`;
|
||||
try {
|
||||
await deleteData('music_failed_cache', cacheKey);
|
||||
} catch {
|
||||
// 忽略删除不存在缓存的错误
|
||||
}
|
||||
}
|
||||
console.log(`清除歌曲 ${id} 的失败缓存`);
|
||||
} catch (error) {
|
||||
console.error('清除缓存失败:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重试工具
|
||||
*/
|
||||
class RetryHelper {
|
||||
/**
|
||||
* 带重试的异步执行
|
||||
*/
|
||||
static async withRetry<T>(
|
||||
fn: () => Promise<T>,
|
||||
maxRetries = CACHE_CONFIG.MAX_RETRY_COUNT,
|
||||
delay = CACHE_CONFIG.RETRY_DELAY
|
||||
): Promise<T> {
|
||||
let lastError: Error;
|
||||
|
||||
for (let i = 0; i <= maxRetries; i++) {
|
||||
try {
|
||||
return await fn();
|
||||
} catch (error) {
|
||||
lastError = error as Error;
|
||||
if (i < maxRetries) {
|
||||
console.log(`重试第 ${i + 1} 次,延迟 ${delay}ms`);
|
||||
await new Promise((resolve) => setTimeout(resolve, delay));
|
||||
delay *= 2; // 指数退避
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw lastError!;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从Bilibili获取音频URL
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果
|
||||
*/
|
||||
const getBilibiliAudio = async (data: SongResult) => {
|
||||
const songName = data?.name || '';
|
||||
const artistName =
|
||||
Array.isArray(data?.ar) && data.ar.length > 0 && data.ar[0]?.name ? data.ar[0].name : '';
|
||||
const albumName = data?.al && typeof data.al === 'object' && data.al?.name ? data.al.name : '';
|
||||
|
||||
const searchQuery = [songName, artistName, albumName].filter(Boolean).join(' ').trim();
|
||||
console.log('开始搜索bilibili音频:', searchQuery);
|
||||
|
||||
const url = await searchAndGetBilibiliAudioUrl(searchQuery);
|
||||
return {
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: { url }
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 从GD音乐台获取音频URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果,失败时返回null
|
||||
*/
|
||||
const getGDMusicAudio = async (id: number, data: SongResult): Promise<ParsedMusicResult | null> => {
|
||||
try {
|
||||
const gdResult = await parseFromGDMusic(id, data, '999');
|
||||
if (gdResult) {
|
||||
return gdResult;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('GD音乐台解析失败:', error);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 使用unblockMusic解析音频URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @param sources 音源列表
|
||||
* @returns 解析结果
|
||||
*/
|
||||
const getUnblockMusicAudio = (id: number, data: SongResult, sources: any[]) => {
|
||||
const filteredSources = sources.filter((source) => source !== 'gdmusic');
|
||||
console.log(`使用unblockMusic解析,音源:`, filteredSources);
|
||||
return window.api.unblockMusic(id, cloneDeep(data), cloneDeep(filteredSources));
|
||||
};
|
||||
|
||||
/**
|
||||
* 统一的解析结果适配器
|
||||
*/
|
||||
const adaptParseResult = (result: any): MusicParseResult | null => {
|
||||
if (!result) return null;
|
||||
|
||||
// 如果已经是标准格式
|
||||
if (result.data?.code !== undefined && result.data?.message !== undefined) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// 适配GD音乐台的返回格式
|
||||
if (result.data?.data?.url) {
|
||||
return {
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: {
|
||||
url: result.data.data.url,
|
||||
...result.data.data
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// 适配其他格式
|
||||
if (result.url) {
|
||||
return {
|
||||
data: {
|
||||
code: 200,
|
||||
message: 'success',
|
||||
data: {
|
||||
url: result.url,
|
||||
...result
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 音源解析策略接口
|
||||
*/
|
||||
interface MusicSourceStrategy {
|
||||
name: string;
|
||||
priority: number;
|
||||
canHandle: (sources: string[], settingsStore?: any) => boolean;
|
||||
parse: (
|
||||
id: number,
|
||||
data: SongResult,
|
||||
quality?: string,
|
||||
sources?: string[]
|
||||
) => Promise<MusicParseResult | null>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义API解析策略
|
||||
*/
|
||||
class CustomApiStrategy implements MusicSourceStrategy {
|
||||
name = 'custom';
|
||||
priority = 1;
|
||||
|
||||
canHandle(sources: string[], settingsStore?: any): boolean {
|
||||
return sources.includes('custom') && Boolean(settingsStore?.setData?.customApiPlugin);
|
||||
}
|
||||
|
||||
async parse(id: number, data: SongResult, quality = 'higher'): Promise<MusicParseResult | null> {
|
||||
// 检查失败缓存
|
||||
if (CacheManager.isInFailedCache(id, this.name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('尝试使用自定义API解析...');
|
||||
const result = await RetryHelper.withRetry(async () => {
|
||||
return await parseFromCustomApi(id, data, quality);
|
||||
});
|
||||
|
||||
const adaptedResult = adaptParseResult(result);
|
||||
if (adaptedResult?.data?.data?.url) {
|
||||
console.log('自定义API解析成功');
|
||||
return adaptedResult;
|
||||
}
|
||||
|
||||
// 解析失败,添加失败缓存
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error('自定义API解析失败:', error);
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bilibili解析策略
|
||||
*/
|
||||
class BilibiliStrategy implements MusicSourceStrategy {
|
||||
name = 'bilibili';
|
||||
priority = 2;
|
||||
|
||||
canHandle(sources: string[]): boolean {
|
||||
return sources.includes('bilibili');
|
||||
}
|
||||
|
||||
async parse(id: number, data: SongResult): Promise<MusicParseResult | null> {
|
||||
// 检查失败缓存
|
||||
if (CacheManager.isInFailedCache(id, this.name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('尝试使用Bilibili解析...');
|
||||
const result = await RetryHelper.withRetry(async () => {
|
||||
return await getBilibiliAudio(data);
|
||||
});
|
||||
|
||||
const adaptedResult = adaptParseResult(result);
|
||||
if (adaptedResult?.data?.data?.url) {
|
||||
console.log('Bilibili解析成功');
|
||||
return adaptedResult;
|
||||
}
|
||||
|
||||
// 解析失败,添加失败缓存
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error('Bilibili解析失败:', error);
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GD音乐台解析策略
|
||||
*/
|
||||
class GDMusicStrategy implements MusicSourceStrategy {
|
||||
name = 'gdmusic';
|
||||
priority = 3;
|
||||
|
||||
canHandle(sources: string[]): boolean {
|
||||
return sources.includes('gdmusic');
|
||||
}
|
||||
|
||||
async parse(id: number, data: SongResult): Promise<MusicParseResult | null> {
|
||||
// 检查失败缓存
|
||||
if (CacheManager.isInFailedCache(id, this.name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('尝试使用GD音乐台解析...');
|
||||
const result = await RetryHelper.withRetry(async () => {
|
||||
return await getGDMusicAudio(id, data);
|
||||
});
|
||||
|
||||
const adaptedResult = adaptParseResult(result);
|
||||
if (adaptedResult?.data?.data?.url) {
|
||||
console.log('GD音乐台解析成功');
|
||||
return adaptedResult;
|
||||
}
|
||||
|
||||
// 解析失败,添加失败缓存
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error('GD音乐台解析失败:', error);
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* UnblockMusic解析策略
|
||||
*/
|
||||
class UnblockMusicStrategy implements MusicSourceStrategy {
|
||||
name = 'unblockMusic';
|
||||
priority = 4;
|
||||
|
||||
canHandle(sources: string[]): boolean {
|
||||
const unblockSources = sources.filter(
|
||||
(source) => !['custom', 'bilibili', 'gdmusic'].includes(source)
|
||||
);
|
||||
return unblockSources.length > 0;
|
||||
}
|
||||
|
||||
async parse(
|
||||
id: number,
|
||||
data: SongResult,
|
||||
_quality?: string,
|
||||
sources?: string[]
|
||||
): Promise<MusicParseResult | null> {
|
||||
// 检查失败缓存
|
||||
if (CacheManager.isInFailedCache(id, this.name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const unblockSources = (sources || []).filter(
|
||||
(source) => !['custom', 'bilibili', 'gdmusic'].includes(source)
|
||||
);
|
||||
console.log('尝试使用UnblockMusic解析:', unblockSources);
|
||||
|
||||
const result = await RetryHelper.withRetry(async () => {
|
||||
return await getUnblockMusicAudio(id, data, unblockSources);
|
||||
});
|
||||
|
||||
const adaptedResult = adaptParseResult(result);
|
||||
if (adaptedResult?.data?.data?.url) {
|
||||
console.log('UnblockMusic解析成功');
|
||||
return adaptedResult;
|
||||
}
|
||||
|
||||
// 解析失败,添加失败缓存
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error('UnblockMusic解析失败:', error);
|
||||
CacheManager.addFailedCache(id, this.name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 音源策略工厂
|
||||
*/
|
||||
class MusicSourceStrategyFactory {
|
||||
private static strategies: MusicSourceStrategy[] = [
|
||||
new LxMusicStrategy(),
|
||||
new CustomApiStrategy(),
|
||||
new BilibiliStrategy(),
|
||||
new GDMusicStrategy(),
|
||||
new UnblockMusicStrategy()
|
||||
];
|
||||
|
||||
/**
|
||||
* 获取可用的解析策略
|
||||
* @param sources 音源列表
|
||||
* @param settingsStore 设置存储
|
||||
* @returns 排序后的可用策略列表
|
||||
*/
|
||||
static getAvailableStrategies(sources: string[], settingsStore?: any): MusicSourceStrategy[] {
|
||||
return this.strategies
|
||||
.filter((strategy) => strategy.canHandle(sources, settingsStore))
|
||||
.sort((a, b) => a.priority - b.priority);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取音源配置
|
||||
* @param id 歌曲ID
|
||||
* @param settingsStore 设置存储
|
||||
* @returns 音源列表和音质设置
|
||||
*/
|
||||
const getMusicConfig = (id: number, settingsStore?: any) => {
|
||||
let musicSources: string[] = [];
|
||||
let quality = 'higher';
|
||||
|
||||
try {
|
||||
// 尝试获取歌曲自定义音源(使用 SongSourceConfigManager)
|
||||
const songConfig = SongSourceConfigManager.getConfig(id);
|
||||
if (songConfig && songConfig.sources.length > 0) {
|
||||
musicSources = songConfig.sources;
|
||||
console.log(`使用歌曲 ${id} 自定义音源:`, musicSources);
|
||||
}
|
||||
|
||||
// 如果没有自定义音源,使用全局设置
|
||||
if (musicSources.length === 0) {
|
||||
musicSources = settingsStore?.setData?.enabledMusicSources || [];
|
||||
console.log('使用全局音源设置:', musicSources);
|
||||
}
|
||||
|
||||
quality = settingsStore?.setData?.musicQuality || 'higher';
|
||||
} catch (error) {
|
||||
console.error('读取音源配置失败,使用默认配置:', error);
|
||||
musicSources = [];
|
||||
quality = 'higher';
|
||||
}
|
||||
|
||||
return { musicSources, quality };
|
||||
};
|
||||
|
||||
/**
|
||||
* 音乐解析器主类
|
||||
*/
|
||||
export class MusicParser {
|
||||
/**
|
||||
* 解析音乐URL
|
||||
* @param id 歌曲ID
|
||||
* @param data 歌曲数据
|
||||
* @returns 解析结果
|
||||
*/
|
||||
static async parseMusic(id: number, data: SongResult): Promise<MusicParseResult> {
|
||||
const startTime = performance.now();
|
||||
|
||||
try {
|
||||
// 非Electron环境直接使用API请求
|
||||
if (!isElectron) {
|
||||
console.log('非Electron环境,使用API请求');
|
||||
return await requestMusic.get<any>('/music', { params: { id } });
|
||||
}
|
||||
|
||||
// 获取设置存储
|
||||
let settingsStore: any;
|
||||
try {
|
||||
settingsStore = useSettingsStore();
|
||||
} catch (error) {
|
||||
console.error('无法获取设置存储,使用后备方案:', error);
|
||||
return await requestMusic.get<any>('/music', { params: { id } });
|
||||
}
|
||||
|
||||
// 获取音源配置
|
||||
const { musicSources, quality } = getMusicConfig(id, settingsStore);
|
||||
|
||||
// 检查缓存(传入音源配置用于验证缓存有效性)
|
||||
console.log(`检查歌曲 ${id} 的缓存...`);
|
||||
const cachedResult = await CacheManager.getCachedMusicUrl(id, musicSources);
|
||||
if (cachedResult) {
|
||||
const endTime = performance.now();
|
||||
console.log(`✅ 命中缓存,歌曲 ${id},耗时: ${(endTime - startTime).toFixed(2)}ms`);
|
||||
return cachedResult;
|
||||
}
|
||||
console.log(`❌ 未命中缓存,歌曲 ${id},开始解析...`);
|
||||
|
||||
// 检查音乐解析功能是否启用
|
||||
if (!settingsStore?.setData?.enableMusicUnblock) {
|
||||
console.log('音乐解析功能已禁用');
|
||||
return {
|
||||
data: {
|
||||
code: 404,
|
||||
message: '音乐解析功能已禁用',
|
||||
data: undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (musicSources.length === 0) {
|
||||
console.warn('没有配置可用的音源,使用后备方案');
|
||||
return await requestMusic.get<any>('/music', { params: { id } });
|
||||
}
|
||||
|
||||
// 获取可用的解析策略
|
||||
const availableStrategies = MusicSourceStrategyFactory.getAvailableStrategies(
|
||||
musicSources,
|
||||
settingsStore
|
||||
);
|
||||
|
||||
if (availableStrategies.length === 0) {
|
||||
console.warn('没有可用的解析策略,使用后备方案');
|
||||
return await requestMusic.get<any>('/music', { params: { id } });
|
||||
}
|
||||
|
||||
console.log(
|
||||
`开始解析歌曲 ${id},可用策略:`,
|
||||
availableStrategies.map((s) => s.name)
|
||||
);
|
||||
|
||||
// 按优先级依次尝试解析策略
|
||||
for (const strategy of availableStrategies) {
|
||||
try {
|
||||
const result = await strategy.parse(id, data, quality, musicSources);
|
||||
if (result?.data?.data?.url) {
|
||||
const endTime = performance.now();
|
||||
console.log(
|
||||
`解析成功,使用策略: ${strategy.name},耗时: ${(endTime - startTime).toFixed(2)}ms`
|
||||
);
|
||||
|
||||
// 缓存成功结果(包含音源配置)
|
||||
await CacheManager.setCachedMusicUrl(id, result, musicSources);
|
||||
|
||||
return result;
|
||||
}
|
||||
console.log(`策略 ${strategy.name} 解析失败,继续尝试下一个策略`);
|
||||
} catch (error) {
|
||||
console.error(`策略 ${strategy.name} 解析异常:`, error);
|
||||
// 继续尝试下一个策略
|
||||
}
|
||||
}
|
||||
|
||||
console.warn('所有解析策略都失败了,使用后备方案');
|
||||
} catch (error) {
|
||||
console.error('MusicParser.parseMusic 执行异常,使用后备方案:', error);
|
||||
}
|
||||
|
||||
// 后备方案:使用API请求
|
||||
try {
|
||||
console.log('使用后备方案:API请求');
|
||||
const result = await requestMusic.get<any>('/music', { params: { id } });
|
||||
|
||||
// 如果后备方案成功,也进行缓存
|
||||
if (result?.data?.data?.url) {
|
||||
console.log('后备方案成功,缓存结果');
|
||||
await CacheManager.setCachedMusicUrl(id, result, []);
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch (apiError) {
|
||||
console.error('API请求也失败了:', apiError);
|
||||
const endTime = performance.now();
|
||||
console.log(`总耗时: ${(endTime - startTime).toFixed(2)}ms`);
|
||||
return {
|
||||
data: {
|
||||
code: 500,
|
||||
message: '所有解析方式都失败了',
|
||||
data: undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
107
src/renderer/api/parseFromCustomApi.ts
Normal file
107
src/renderer/api/parseFromCustomApi.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
import axios from 'axios';
|
||||
import { get } from 'lodash';
|
||||
|
||||
import { useSettingsStore } from '@/store';
|
||||
|
||||
import type { ParsedMusicResult } from './gdmusic';
|
||||
|
||||
/**
|
||||
* 定义自定义API JSON插件的结构
|
||||
*/
|
||||
interface CustomApiPlugin {
|
||||
name: string;
|
||||
apiUrl: string;
|
||||
method?: 'GET' | 'POST';
|
||||
params: Record<string, string>;
|
||||
qualityMapping?: Record<string, string>;
|
||||
responseUrlPath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从用户导入的自定义API JSON配置中解析音乐URL
|
||||
*/
|
||||
export const parseFromCustomApi = async (
|
||||
id: number,
|
||||
_songData: any,
|
||||
quality: string = 'higher',
|
||||
timeout: number = 10000
|
||||
): Promise<ParsedMusicResult | null> => {
|
||||
const settingsStore = useSettingsStore();
|
||||
const pluginString = settingsStore.setData.customApiPlugin;
|
||||
|
||||
if (!pluginString) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let plugin: CustomApiPlugin;
|
||||
try {
|
||||
plugin = JSON.parse(pluginString);
|
||||
if (!plugin.apiUrl || !plugin.params || !plugin.responseUrlPath) {
|
||||
console.error('自定义API:JSON配置文件格式不正确。');
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('自定义API:解析JSON配置文件失败。', error);
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(`自定义API:正在使用插件 [${plugin.name}] 进行解析...`);
|
||||
|
||||
try {
|
||||
// 1. 准备请求参数,替换占位符
|
||||
const finalParams: Record<string, string> = {};
|
||||
for (const [key, value] of Object.entries(plugin.params)) {
|
||||
if (value === '{songId}') {
|
||||
finalParams[key] = String(id);
|
||||
} else if (value === '{quality}') {
|
||||
// 使用 qualityMapping (如果存在) 进行音质翻译,否则直接使用原quality
|
||||
finalParams[key] = plugin.qualityMapping?.[quality] ?? quality;
|
||||
} else {
|
||||
// 固定值参数
|
||||
finalParams[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. 判断请求方法,默认为GET
|
||||
const method = plugin.method?.toUpperCase() === 'POST' ? 'POST' : 'GET';
|
||||
let response;
|
||||
|
||||
// 3. 根据方法发送不同的请求
|
||||
if (method === 'POST') {
|
||||
console.log('自定义API:发送 POST 请求到:', plugin.apiUrl, '参数:', finalParams);
|
||||
response = await axios.post(plugin.apiUrl, finalParams, { timeout });
|
||||
} else {
|
||||
// 默认为 GET
|
||||
const finalUrl = `${plugin.apiUrl}?${new URLSearchParams(finalParams).toString()}`;
|
||||
console.log('自定义API:发送 GET 请求到:', finalUrl);
|
||||
response = await axios.get(finalUrl, { timeout });
|
||||
}
|
||||
|
||||
// 4. 使用 lodash.get 安全地从响应数据中提取URL
|
||||
const musicUrl = get(response.data, plugin.responseUrlPath);
|
||||
|
||||
if (musicUrl && typeof musicUrl === 'string') {
|
||||
console.log('自定义API:成功获取URL!');
|
||||
// 5. 组装成应用所需的标准格式并返回
|
||||
return {
|
||||
data: {
|
||||
data: {
|
||||
url: musicUrl,
|
||||
br: parseInt(quality) * 1000,
|
||||
size: 0,
|
||||
md5: '',
|
||||
platform: plugin.name.toLowerCase().replace(/\s/g, ''),
|
||||
gain: 0
|
||||
},
|
||||
params: { id, type: 'song' }
|
||||
}
|
||||
};
|
||||
} else {
|
||||
console.error('自定义API:根据路径未能从响应中找到URL:', plugin.responseUrlPath);
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`自定义API [${plugin.name}] 执行失败:`, error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
import { isElectron } from '@/utils';
|
||||
import request from '@/utils/request';
|
||||
|
||||
interface IParams {
|
||||
@@ -12,3 +13,74 @@ export const getSearch = (params: IParams) => {
|
||||
params
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索建议接口返回的数据结构
|
||||
*/
|
||||
interface Suggestion {
|
||||
keyword: string;
|
||||
}
|
||||
|
||||
interface KugouSuggestionResponse {
|
||||
data: Suggestion[];
|
||||
}
|
||||
|
||||
// 网易云搜索建议返回的数据结构(部分字段)
|
||||
interface NeteaseSuggestResult {
|
||||
result?: {
|
||||
songs?: Array<{ name: string }>;
|
||||
artists?: Array<{ name: string }>;
|
||||
albums?: Array<{ name: string }>;
|
||||
};
|
||||
code?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从酷狗获取搜索建议
|
||||
* @param keyword 搜索关键词
|
||||
*/
|
||||
export const getSearchSuggestions = async (keyword: string) => {
|
||||
console.log('[API] getSearchSuggestions: 开始执行');
|
||||
|
||||
if (!keyword || !keyword.trim()) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
console.log(`[API] getSearchSuggestions: 准备请求,关键词: "${keyword}"`);
|
||||
|
||||
try {
|
||||
let responseData: KugouSuggestionResponse;
|
||||
if (isElectron) {
|
||||
console.log('[API] Running in Electron, using IPC proxy.');
|
||||
responseData = await window.api.getSearchSuggestions(keyword);
|
||||
} else {
|
||||
// 非 Electron 环境下,使用网易云接口
|
||||
const res = await request.get<NeteaseSuggestResult>('/search/suggest', {
|
||||
params: { keywords: keyword }
|
||||
});
|
||||
|
||||
const result = res?.data?.result || {};
|
||||
const names: string[] = [];
|
||||
if (Array.isArray(result.songs)) names.push(...result.songs.map((s) => s.name));
|
||||
if (Array.isArray(result.artists)) names.push(...result.artists.map((a) => a.name));
|
||||
if (Array.isArray(result.albums)) names.push(...result.albums.map((al) => al.name));
|
||||
|
||||
// 去重并截取前10个
|
||||
const unique = Array.from(new Set(names)).slice(0, 10);
|
||||
console.log('[API] getSearchSuggestions: 网易云建议解析成功:', unique);
|
||||
return unique;
|
||||
}
|
||||
|
||||
if (responseData && Array.isArray(responseData.data)) {
|
||||
const suggestions = responseData.data.map((item) => item.keyword).slice(0, 10);
|
||||
console.log('[API] getSearchSuggestions: 成功解析建议:', suggestions);
|
||||
return suggestions;
|
||||
}
|
||||
|
||||
console.warn('[API] getSearchSuggestions: 响应数据格式不正确,返回空数组。');
|
||||
return [];
|
||||
} catch (error) {
|
||||
console.error('[API] getSearchSuggestions: 请求失败,错误信息:', error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,6 +20,33 @@ export function getUserRecord(uid: number, type: number = 0) {
|
||||
} as any);
|
||||
}
|
||||
|
||||
// 最近播放-歌曲
|
||||
// /record/recent/song
|
||||
export function getRecentSongs(limit: number = 100) {
|
||||
return request.get('/record/recent/song', {
|
||||
params: { limit },
|
||||
noRetry: true
|
||||
} as any);
|
||||
}
|
||||
|
||||
// 最近播放-歌单
|
||||
// /record/recent/playlist
|
||||
export function getRecentPlaylists(limit: number = 100) {
|
||||
return request.get('/record/recent/playlist', {
|
||||
params: { limit },
|
||||
noRetry: true
|
||||
} as any);
|
||||
}
|
||||
|
||||
// 最近播放-专辑
|
||||
// /record/recent/album
|
||||
export function getRecentAlbums(limit: number = 100) {
|
||||
return request.get('/record/recent/album', {
|
||||
params: { limit },
|
||||
noRetry: true
|
||||
} as any);
|
||||
}
|
||||
|
||||
// 获取用户关注列表
|
||||
// /user/follows?uid=32953014
|
||||
export function getUserFollows(uid: number, limit: number = 30, offset: number = 0) {
|
||||
@@ -72,3 +99,15 @@ export const getUserPlaylists = (params: { uid: string | number }) => {
|
||||
params
|
||||
});
|
||||
};
|
||||
|
||||
// 获取已收藏专辑列表
|
||||
export const getUserAlbumSublist = (params?: { limit?: number; offset?: number }) => {
|
||||
return request({
|
||||
url: '/album/sublist',
|
||||
method: 'get',
|
||||
params: {
|
||||
limit: params?.limit || 25,
|
||||
offset: params?.offset || 0
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
<template>
|
||||
<div class="traffic-warning-trigger">
|
||||
<n-button circle secondary class="mac-style-button" @click="showDrawer = true">
|
||||
<template #icon>
|
||||
<i class="iconfont ri-information-line"></i>
|
||||
</template>
|
||||
</n-button>
|
||||
</div>
|
||||
|
||||
<n-drawer
|
||||
v-model:show="showDrawer"
|
||||
:width="isMobile ? '100%' : '800px'"
|
||||
|
||||
112
src/renderer/components/common/AlbumItem.vue
Normal file
112
src/renderer/components/common/AlbumItem.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div class="album-item" @click="handleClick">
|
||||
<n-image
|
||||
:src="getImgUrl(item.picUrl || '', '100y100')"
|
||||
class="album-item-img"
|
||||
lazy
|
||||
preview-disabled
|
||||
/>
|
||||
<div class="album-item-info">
|
||||
<div class="album-item-name">
|
||||
<n-ellipsis :line-clamp="1">{{ item.name }}</n-ellipsis>
|
||||
</div>
|
||||
<div class="album-item-desc">
|
||||
{{ getDescription() }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showCount && item.count" class="album-item-count">
|
||||
{{ item.count }}
|
||||
</div>
|
||||
<div v-if="showDelete" class="album-item-delete" @click.stop="handleDelete">
|
||||
<i class="iconfont icon-close"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import type { AlbumHistoryItem } from '@/hooks/AlbumHistoryHook';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
interface Props {
|
||||
item: AlbumHistoryItem;
|
||||
showCount?: boolean;
|
||||
showDelete?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showCount: false,
|
||||
showDelete: false
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
click: [item: AlbumHistoryItem];
|
||||
delete: [item: AlbumHistoryItem];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const getDescription = () => {
|
||||
const parts: string[] = [];
|
||||
|
||||
if (props.item.artist?.name) {
|
||||
parts.push(props.item.artist.name);
|
||||
}
|
||||
|
||||
if (props.item.size !== undefined) {
|
||||
parts.push(t('user.album.songCount', { count: props.item.size }));
|
||||
}
|
||||
|
||||
return parts.join(' · ') || t('history.noDescription');
|
||||
};
|
||||
|
||||
const handleClick = () => {
|
||||
emit('click', props.item);
|
||||
};
|
||||
|
||||
const handleDelete = () => {
|
||||
emit('delete', props.item);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.album-item {
|
||||
@apply flex items-center px-2 py-2 rounded-xl cursor-pointer;
|
||||
@apply transition-all duration-200;
|
||||
@apply bg-light-100 dark:bg-dark-100;
|
||||
@apply hover:bg-light-200 dark:hover:bg-dark-200;
|
||||
@apply mb-2;
|
||||
|
||||
&-img {
|
||||
@apply flex items-center justify-center rounded-xl;
|
||||
@apply w-[60px] h-[60px] flex-shrink-0;
|
||||
@apply bg-light-300 dark:bg-dark-300;
|
||||
}
|
||||
|
||||
&-info {
|
||||
@apply ml-3 flex-1 min-w-0;
|
||||
}
|
||||
|
||||
&-name {
|
||||
@apply text-gray-900 dark:text-white text-base mb-1;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
@apply text-sm text-gray-500 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-count {
|
||||
@apply px-4 text-lg text-center min-w-[60px];
|
||||
@apply text-gray-600 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-delete {
|
||||
@apply cursor-pointer rounded-full border-2 w-8 h-8 flex justify-center items-center;
|
||||
@apply border-gray-400 dark:border-gray-600;
|
||||
@apply text-gray-600 dark:text-gray-400;
|
||||
@apply hover:border-red-500 hover:text-red-500;
|
||||
@apply transition-all;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -19,8 +19,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import type { IBilibiliSearchResult } from '@/types/bilibili';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
item: IBilibiliSearchResult;
|
||||
}>();
|
||||
@@ -39,7 +43,7 @@ const handleClick = () => {
|
||||
const formatNumber = (num?: number) => {
|
||||
if (!num) return '0';
|
||||
if (num >= 10000) {
|
||||
return `${(num / 10000).toFixed(1)}万`;
|
||||
return `${(num / 10000).toFixed(1)}${t('bilibili.player.num')}`;
|
||||
}
|
||||
return num.toString();
|
||||
};
|
||||
|
||||
356
src/renderer/components/common/DisclaimerModal.vue
Normal file
356
src/renderer/components/common/DisclaimerModal.vue
Normal file
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<Transition name="disclaimer-modal">
|
||||
<!-- 免责声明页面 -->
|
||||
<div
|
||||
v-if="showDisclaimer"
|
||||
class="fixed inset-0 z-[999999] flex items-center justify-center bg-black/60 backdrop-blur-md"
|
||||
>
|
||||
<div
|
||||
class="w-full max-w-md mx-4 bg-white dark:bg-gray-900 rounded-3xl overflow-hidden shadow-2xl"
|
||||
>
|
||||
<!-- 顶部渐变装饰 -->
|
||||
<div class="h-2 bg-gradient-to-r from-amber-400 via-orange-500 to-red-500"></div>
|
||||
<!-- 标题 -->
|
||||
<h2 class="text-2xl font-bold text-center text-gray-900 dark:text-white px-6 mt-10">
|
||||
{{ t('comp.disclaimer.title') }}
|
||||
</h2>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<div class="px-6 py-6">
|
||||
<div class="space-y-4 text-sm text-gray-600 dark:text-gray-300 leading-relaxed">
|
||||
<!-- 警告框 -->
|
||||
<div
|
||||
class="p-4 rounded-2xl bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800"
|
||||
>
|
||||
<div class="flex items-start gap-3">
|
||||
<i class="ri-alert-line text-amber-500 text-xl flex-shrink-0 mt-0.5"></i>
|
||||
<p class="text-amber-700 dark:text-amber-300">
|
||||
{{ t('comp.disclaimer.warning') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 免责条款列表 -->
|
||||
<div class="space-y-3">
|
||||
<div class="flex items-start gap-3">
|
||||
<div
|
||||
class="w-6 h-6 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center flex-shrink-0"
|
||||
>
|
||||
<i class="ri-book-2-line text-blue-500 text-sm"></i>
|
||||
</div>
|
||||
<p>{{ t('comp.disclaimer.item1') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-start gap-3">
|
||||
<div
|
||||
class="w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0"
|
||||
>
|
||||
<i class="ri-time-line text-green-500 text-sm"></i>
|
||||
</div>
|
||||
<p>{{ t('comp.disclaimer.item2') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-start gap-3">
|
||||
<div
|
||||
class="w-6 h-6 rounded-full bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center flex-shrink-0"
|
||||
>
|
||||
<i class="ri-shield-check-line text-purple-500 text-sm"></i>
|
||||
</div>
|
||||
<p>{{ t('comp.disclaimer.item3') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="px-6 pb-8 space-y-3">
|
||||
<button
|
||||
@click="handleAgree"
|
||||
class="w-full py-4 rounded-2xl text-base font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 active:scale-[0.98] transition-all duration-200 shadow-lg shadow-green-500/25"
|
||||
>
|
||||
<span class="flex items-center justify-center gap-2">
|
||||
<i class="ri-check-line text-lg"></i>
|
||||
{{ t('comp.disclaimer.agree') }}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
@click="handleDisagree"
|
||||
class="w-full py-3 rounded-2xl text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 transition-colors"
|
||||
>
|
||||
{{ t('comp.disclaimer.disagree') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
<!-- 捐赠页面 -->
|
||||
<Transition name="donate-modal">
|
||||
<div
|
||||
v-if="showDonate"
|
||||
class="fixed inset-0 z-[999999] flex items-center justify-center bg-black/60 backdrop-blur-md"
|
||||
>
|
||||
<div
|
||||
class="w-full max-w-md mx-4 bg-white dark:bg-gray-900 rounded-3xl overflow-hidden shadow-2xl"
|
||||
>
|
||||
<!-- 顶部渐变装饰 -->
|
||||
<div class="h-2 bg-gradient-to-r from-pink-400 via-rose-500 to-red-500"></div>
|
||||
|
||||
<!-- 图标区域 -->
|
||||
<div class="flex justify-center pt-8 pb-4">
|
||||
<div
|
||||
class="w-20 h-20 rounded-2xl bg-gradient-to-br from-pink-400 to-rose-500 flex items-center justify-center shadow-lg"
|
||||
>
|
||||
<i class="ri-heart-3-fill text-4xl text-white"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 标题 -->
|
||||
<h2 class="text-2xl font-bold text-center text-gray-900 dark:text-white px-6">
|
||||
{{ t('comp.donate.title') }}
|
||||
</h2>
|
||||
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400 text-center mt-2 px-6">
|
||||
{{ t('comp.donate.subtitle') }}
|
||||
</p>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<div class="px-6 py-6">
|
||||
<!-- 提示信息 -->
|
||||
<div
|
||||
class="p-4 rounded-2xl bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 mb-6"
|
||||
>
|
||||
<div class="flex items-start gap-3">
|
||||
<i class="ri-gift-line text-rose-500 text-xl flex-shrink-0 mt-0.5"></i>
|
||||
<p class="text-rose-700 dark:text-rose-300 text-sm">
|
||||
{{ t('comp.donate.tip') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 捐赠方式 -->
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<button
|
||||
@click="openDonateLink('wechat')"
|
||||
class="flex flex-col items-center gap-2 p-4 rounded-2xl bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30 transition-colors"
|
||||
>
|
||||
<div class="w-12 h-12 rounded-xl bg-green-500 flex items-center justify-center">
|
||||
<i class="ri-wechat-fill text-2xl text-white"></i>
|
||||
</div>
|
||||
<span class="text-sm font-medium text-green-700 dark:text-green-300">{{
|
||||
t('comp.donate.wechat')
|
||||
}}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
@click="openDonateLink('alipay')"
|
||||
class="flex flex-col items-center gap-2 p-4 rounded-2xl bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30 transition-colors"
|
||||
>
|
||||
<div class="w-12 h-12 rounded-xl bg-blue-500 flex items-center justify-center">
|
||||
<i class="ri-alipay-fill text-2xl text-white"></i>
|
||||
</div>
|
||||
<span class="text-sm font-medium text-blue-700 dark:text-blue-300">{{
|
||||
t('comp.donate.alipay')
|
||||
}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 进入应用按钮 -->
|
||||
<div class="px-6 pb-8">
|
||||
<button
|
||||
@click="handleEnterApp"
|
||||
class="w-full py-4 rounded-2xl text-base font-medium text-white bg-gradient-to-r from-gray-700 to-gray-900 dark:from-gray-600 dark:to-gray-800 hover:from-gray-800 hover:to-gray-950 active:scale-[0.98] transition-all duration-200 shadow-lg"
|
||||
>
|
||||
<span class="flex items-center justify-center gap-2">
|
||||
<i class="ri-arrow-right-line text-lg"></i>
|
||||
{{ t('comp.donate.enterApp') }}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<p class="text-xs text-gray-400 dark:text-gray-500 text-center mt-3">
|
||||
{{ t('comp.donate.noForce') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
<!-- 收款码弹窗 -->
|
||||
<Transition name="qrcode-modal">
|
||||
<div
|
||||
v-if="showQRCode"
|
||||
class="fixed inset-0 z-[9999999] flex items-center justify-center bg-black/70 backdrop-blur-md"
|
||||
@click.self="closeQRCode"
|
||||
>
|
||||
<div
|
||||
class="w-full max-w-sm mx-4 bg-white dark:bg-gray-900 rounded-3xl overflow-hidden shadow-2xl"
|
||||
>
|
||||
<!-- 顶部渐变装饰 -->
|
||||
<div
|
||||
class="h-2"
|
||||
:class="
|
||||
qrcodeType === 'wechat'
|
||||
? 'bg-gradient-to-r from-green-400 to-green-600'
|
||||
: 'bg-gradient-to-r from-blue-400 to-blue-600'
|
||||
"
|
||||
></div>
|
||||
|
||||
<!-- 标题 -->
|
||||
<div class="flex items-center justify-between px-6 py-4">
|
||||
<h3 class="text-lg font-bold text-gray-900 dark:text-white">
|
||||
{{ qrcodeType === 'wechat' ? t('comp.donate.wechatQR') : t('comp.donate.alipayQR') }}
|
||||
</h3>
|
||||
<button
|
||||
@click="closeQRCode"
|
||||
class="w-8 h-8 rounded-full flex items-center justify-center text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
>
|
||||
<i class="ri-close-line text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 二维码图片 -->
|
||||
<div class="px-6 pb-6">
|
||||
<div class="bg-white p-4 rounded-2xl">
|
||||
<img
|
||||
:src="qrcodeType === 'wechat' ? wechatQRCode : alipayQRCode"
|
||||
:alt="qrcodeType === 'wechat' ? 'WeChat QR Code' : 'Alipay QR Code'"
|
||||
class="w-full rounded-xl"
|
||||
/>
|
||||
</div>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400 text-center mt-4">
|
||||
{{ t('comp.donate.scanTip') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
// 导入收款码图片
|
||||
import alipayQRCode from '@/assets/alipay.png';
|
||||
import wechatQRCode from '@/assets/wechat.png';
|
||||
import { isElectron, isLyricWindow } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 缓存键
|
||||
const DISCLAIMER_AGREED_KEY = 'disclaimer_agreed_timestamp';
|
||||
|
||||
const showDisclaimer = ref(false);
|
||||
const showDonate = ref(false);
|
||||
const showQRCode = ref(false);
|
||||
const qrcodeType = ref<'wechat' | 'alipay'>('wechat');
|
||||
const isTransitioning = ref(false); // 防止用户点击过快
|
||||
|
||||
// 检查是否需要显示免责声明
|
||||
const shouldShowDisclaimer = () => {
|
||||
return !localStorage.getItem(DISCLAIMER_AGREED_KEY);
|
||||
};
|
||||
|
||||
// 处理同意
|
||||
const handleAgree = () => {
|
||||
if (isTransitioning.value) return;
|
||||
isTransitioning.value = true;
|
||||
|
||||
showDisclaimer.value = false;
|
||||
setTimeout(() => {
|
||||
showDonate.value = true;
|
||||
isTransitioning.value = false;
|
||||
}, 300);
|
||||
};
|
||||
|
||||
// 处理不同意 - 退出应用
|
||||
const handleDisagree = () => {
|
||||
if (isTransitioning.value) return;
|
||||
isTransitioning.value = true;
|
||||
|
||||
if (isElectron) {
|
||||
// Electron 环境下强制退出应用
|
||||
window.api?.quitApp?.();
|
||||
} else {
|
||||
// Web 环境下尝试关闭窗口
|
||||
window.close();
|
||||
}
|
||||
isTransitioning.value = false;
|
||||
};
|
||||
|
||||
// 打开捐赠链接
|
||||
const openDonateLink = (type: 'wechat' | 'alipay') => {
|
||||
if (isTransitioning.value) return;
|
||||
|
||||
qrcodeType.value = type;
|
||||
showQRCode.value = true;
|
||||
};
|
||||
|
||||
// 关闭二维码弹窗
|
||||
const closeQRCode = () => {
|
||||
showQRCode.value = false;
|
||||
};
|
||||
|
||||
// 进入应用
|
||||
const handleEnterApp = () => {
|
||||
if (isTransitioning.value) return;
|
||||
isTransitioning.value = true;
|
||||
|
||||
// 记录同意时间
|
||||
localStorage.setItem(DISCLAIMER_AGREED_KEY, Date.now().toString());
|
||||
showDonate.value = false;
|
||||
|
||||
setTimeout(() => {
|
||||
isTransitioning.value = false;
|
||||
}, 300);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// 歌词窗口不显示免责声明
|
||||
if (isLyricWindow.value) return;
|
||||
|
||||
// 检查是否需要显示免责声明
|
||||
if (shouldShowDisclaimer()) {
|
||||
showDisclaimer.value = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 免责声明弹窗动画 */
|
||||
.disclaimer-modal-enter-active,
|
||||
.disclaimer-modal-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.disclaimer-modal-enter-from,
|
||||
.disclaimer-modal-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* 捐赠弹窗动画 */
|
||||
.donate-modal-enter-active,
|
||||
.donate-modal-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.donate-modal-enter-from,
|
||||
.donate-modal-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* 二维码弹窗动画 */
|
||||
.qrcode-modal-enter-active,
|
||||
.qrcode-modal-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.qrcode-modal-enter-from,
|
||||
.qrcode-modal-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
280
src/renderer/components/common/MobileUpdateModal.vue
Normal file
280
src/renderer/components/common/MobileUpdateModal.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<Transition name="update-modal">
|
||||
<div
|
||||
v-if="showModal"
|
||||
class="fixed inset-0 z-[999999] flex items-end justify-center bg-black/50 backdrop-blur-sm"
|
||||
>
|
||||
<!-- 弹窗内容 -->
|
||||
<div
|
||||
class="w-full max-w-lg bg-white dark:bg-gray-900 rounded-t-3xl overflow-hidden animate-slide-up"
|
||||
>
|
||||
<!-- 顶部装饰条 -->
|
||||
<div class="h-1 bg-gradient-to-r from-green-400 via-green-500 to-emerald-600"></div>
|
||||
|
||||
<!-- 关闭条 -->
|
||||
<div class="flex justify-center pt-3 pb-2">
|
||||
<div class="w-10 h-1 rounded-full bg-gray-300 dark:bg-gray-700"></div>
|
||||
</div>
|
||||
|
||||
<!-- 头部信息 -->
|
||||
<div class="px-6 pb-5">
|
||||
<div class="flex items-center gap-4">
|
||||
<!-- 应用图标 -->
|
||||
<div
|
||||
class="w-20 h-20 rounded-2xl overflow-hidden shadow-lg flex-shrink-0 ring-2 ring-green-500/20"
|
||||
>
|
||||
<img src="@/assets/logo.png" alt="App Icon" class="w-full h-full object-cover" />
|
||||
</div>
|
||||
|
||||
<!-- 版本信息 -->
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="flex items-center gap-2 mb-2">
|
||||
<span
|
||||
class="px-3 py-1 text-xs font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 rounded-full"
|
||||
>
|
||||
{{ t('comp.update.newVersion') }}
|
||||
</span>
|
||||
</div>
|
||||
<h2 class="text-2xl font-bold text-gray-900 dark:text-white truncate">
|
||||
v{{ updateInfo.latestVersion }}
|
||||
</h2>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400 mt-1">
|
||||
{{ t('comp.update.currentVersion') }}: v{{ updateInfo.currentVersion }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 更新内容 -->
|
||||
<div
|
||||
class="mx-6 mb-6 max-h-80 overflow-y-auto rounded-2xl bg-gray-50 dark:bg-gray-800/50"
|
||||
>
|
||||
<div
|
||||
class="p-5 text-sm text-gray-600 dark:text-gray-300 leading-relaxed"
|
||||
v-html="parsedReleaseNotes"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div
|
||||
class="px-6 pb-8 flex gap-3"
|
||||
:style="{ paddingBottom: `calc(32px + var(--safe-area-inset-bottom, 0px))` }"
|
||||
>
|
||||
<button
|
||||
@click="handleLater"
|
||||
class="flex-1 py-4 px-4 rounded-2xl text-base font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 active:scale-[0.98] transition-all duration-200"
|
||||
>
|
||||
{{ t('comp.update.later') }}
|
||||
</button>
|
||||
<button
|
||||
@click="handleUpdate"
|
||||
class="flex-1 py-4 px-4 rounded-2xl text-base font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 active:scale-[0.98] transition-all duration-200 shadow-lg shadow-green-500/25"
|
||||
>
|
||||
<span class="flex items-center justify-center gap-2">
|
||||
<i class="ri-download-2-line text-lg"></i>
|
||||
{{ t('comp.update.updateNow') }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { marked } from 'marked';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { checkUpdate, getProxyNodes, UpdateResult } from '@/utils/update';
|
||||
|
||||
import config from '../../../../package.json';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 缓存键:记录用户点击"稍后提醒"的时间
|
||||
const REMIND_LATER_KEY = 'update_remind_later_timestamp';
|
||||
|
||||
// 配置 marked
|
||||
marked.setOptions({
|
||||
breaks: true,
|
||||
gfm: true
|
||||
});
|
||||
|
||||
const showModal = ref(false);
|
||||
|
||||
const updateInfo = ref<UpdateResult>({
|
||||
hasUpdate: false,
|
||||
latestVersion: '',
|
||||
currentVersion: config.version,
|
||||
releaseInfo: null
|
||||
});
|
||||
|
||||
// 解析 Markdown
|
||||
const parsedReleaseNotes = computed(() => {
|
||||
if (!updateInfo.value.releaseInfo?.body) return '';
|
||||
try {
|
||||
return marked.parse(updateInfo.value.releaseInfo.body);
|
||||
} catch (error) {
|
||||
console.error('Error parsing markdown:', error);
|
||||
return updateInfo.value.releaseInfo.body;
|
||||
}
|
||||
});
|
||||
|
||||
// 检查是否应该显示更新提醒
|
||||
const shouldShowReminder = (): boolean => {
|
||||
const remindLaterTime = localStorage.getItem(REMIND_LATER_KEY);
|
||||
if (!remindLaterTime) return true;
|
||||
|
||||
const savedTime = parseInt(remindLaterTime, 10);
|
||||
const now = Date.now();
|
||||
const oneDayInMs = 24 * 60 * 60 * 1000; // 24小时
|
||||
|
||||
// 如果距离上次点击"稍后提醒"超过24小时,则显示
|
||||
return now - savedTime >= oneDayInMs;
|
||||
};
|
||||
|
||||
// 处理"稍后提醒"
|
||||
const handleLater = () => {
|
||||
// 记录当前时间
|
||||
localStorage.setItem(REMIND_LATER_KEY, Date.now().toString());
|
||||
showModal.value = false;
|
||||
};
|
||||
|
||||
const closeModal = () => {
|
||||
showModal.value = false;
|
||||
};
|
||||
|
||||
const checkForUpdates = async () => {
|
||||
// 检查是否应该显示提醒
|
||||
if (!shouldShowReminder()) {
|
||||
console.log('更新提醒被延迟,等待24小时后再提醒');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await checkUpdate(config.version);
|
||||
if (result && result.hasUpdate) {
|
||||
updateInfo.value = result;
|
||||
showModal.value = true;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('检查更新失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const handleUpdate = async () => {
|
||||
const version = updateInfo.value.latestVersion;
|
||||
|
||||
// Android APK 下载地址
|
||||
const downloadUrl = `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}/AlgerMusicPlayer-${version}.apk`;
|
||||
|
||||
try {
|
||||
// 获取代理节点
|
||||
const proxyHosts = await getProxyNodes();
|
||||
const proxyDownloadUrl = `${proxyHosts[0]}/${downloadUrl}`;
|
||||
|
||||
// 清除"稍后提醒"记录(用户选择更新后,下次应该正常提醒)
|
||||
localStorage.removeItem(REMIND_LATER_KEY);
|
||||
|
||||
// 使用系统浏览器打开下载链接
|
||||
window.open(proxyDownloadUrl, '_blank');
|
||||
|
||||
// 关闭弹窗
|
||||
closeModal();
|
||||
} catch (error) {
|
||||
console.error('打开下载链接失败:', error);
|
||||
// 回退到直接打开 GitHub Releases
|
||||
const releaseUrl =
|
||||
updateInfo.value.releaseInfo?.html_url ||
|
||||
'https://github.com/algerkong/AlgerMusicPlayer/releases/latest';
|
||||
window.open(releaseUrl, '_blank');
|
||||
closeModal();
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// 延迟检查更新,确保应用完全加载
|
||||
setTimeout(() => {
|
||||
checkForUpdates();
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 动画 */
|
||||
.update-modal-enter-active,
|
||||
.update-modal-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.update-modal-enter-from,
|
||||
.update-modal-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.update-modal-enter-active .animate-slide-up,
|
||||
.update-modal-leave-active .animate-slide-up {
|
||||
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
||||
}
|
||||
|
||||
.update-modal-enter-from .animate-slide-up {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
.update-modal-leave-to .animate-slide-up {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
/* 更新内容样式 */
|
||||
:deep(h1) {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
:deep(h2) {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
:deep(h3) {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
:deep(ul) {
|
||||
list-style-type: disc;
|
||||
padding-left: 1.25rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
:deep(ol) {
|
||||
list-style-type: decimal;
|
||||
padding-left: 1.25rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
:deep(li) {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
:deep(p) {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
:deep(code) {
|
||||
padding: 0.125rem 0.375rem;
|
||||
border-radius: 0.25rem;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
:deep(a) {
|
||||
color: #22c55e;
|
||||
}
|
||||
</style>
|
||||
@@ -21,8 +21,13 @@ export function navigateToMusicList(
|
||||
const musicStore = useMusicStore();
|
||||
const { id, type, name, songList, listInfo, canRemove = false } = options;
|
||||
|
||||
// 保存数据到状态管理
|
||||
musicStore.setCurrentMusicList(songList, name, listInfo, canRemove);
|
||||
// 如果是每日推荐,不需要设置 musicStore,直接从 recommendStore 获取
|
||||
if (type !== 'dailyRecommend') {
|
||||
musicStore.setCurrentMusicList(songList, name, listInfo, canRemove);
|
||||
} else {
|
||||
// 确保 musicStore 的数据被清空,避免显示旧的列表
|
||||
musicStore.clearCurrentMusicList();
|
||||
}
|
||||
|
||||
// 路由跳转
|
||||
if (id) {
|
||||
@@ -33,7 +38,8 @@ export function navigateToMusicList(
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
name: 'musicList'
|
||||
name: 'musicList',
|
||||
query: { type: 'dailyRecommend' }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ import { createPlaylist, updatePlaylistTracks } from '@/api/music';
|
||||
import { getUserPlaylist } from '@/api/user';
|
||||
import { useUserStore } from '@/store';
|
||||
import { getImgUrl } from '@/utils';
|
||||
import { getLoginErrorMessage, hasPermission } from '@/utils/auth';
|
||||
|
||||
const store = useUserStore();
|
||||
const { t } = useI18n();
|
||||
@@ -160,6 +161,13 @@ const fetchUserPlaylists = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否有真实登录权限
|
||||
if (!hasPermission(true)) {
|
||||
message.error(getLoginErrorMessage(true));
|
||||
emit('update:modelValue', false);
|
||||
return;
|
||||
}
|
||||
|
||||
const res = await getUserPlaylist(user.userId, 999);
|
||||
if (res.data?.playlist) {
|
||||
playlists.value = res.data.playlist.filter((item: any) => item.userId === user.userId);
|
||||
@@ -173,6 +181,13 @@ const fetchUserPlaylists = async () => {
|
||||
// 添加到歌单
|
||||
const handleAddToPlaylist = async (playlist: any) => {
|
||||
if (!props.songId) return;
|
||||
|
||||
// 检查是否有真实登录权限
|
||||
if (!hasPermission(true)) {
|
||||
message.error(getLoginErrorMessage(true));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await updatePlaylistTracks({
|
||||
op: 'add',
|
||||
@@ -200,6 +215,12 @@ const handleCreatePlaylist = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否有真实登录权限
|
||||
if (!hasPermission(true)) {
|
||||
message.error(getLoginErrorMessage(true));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
creating.value = true;
|
||||
|
||||
|
||||
112
src/renderer/components/common/PlaylistItem.vue
Normal file
112
src/renderer/components/common/PlaylistItem.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div class="playlist-item" @click="handleClick">
|
||||
<n-image
|
||||
:src="getImgUrl(item.coverImgUrl || item.picUrl || '', '100y100')"
|
||||
class="playlist-item-img"
|
||||
lazy
|
||||
preview-disabled
|
||||
/>
|
||||
<div class="playlist-item-info">
|
||||
<div class="playlist-item-name">
|
||||
<n-ellipsis :line-clamp="1">{{ item.name }}</n-ellipsis>
|
||||
</div>
|
||||
<div class="playlist-item-desc">
|
||||
{{ getDescription() }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showCount && item.count" class="playlist-item-count">
|
||||
{{ item.count }}
|
||||
</div>
|
||||
<div v-if="showDelete" class="playlist-item-delete" @click.stop="handleDelete">
|
||||
<i class="iconfont icon-close"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import type { PlaylistHistoryItem } from '@/hooks/PlaylistHistoryHook';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
interface Props {
|
||||
item: PlaylistHistoryItem;
|
||||
showCount?: boolean;
|
||||
showDelete?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showCount: false,
|
||||
showDelete: false
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
click: [item: PlaylistHistoryItem];
|
||||
delete: [item: PlaylistHistoryItem];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const getDescription = () => {
|
||||
const parts: string[] = [];
|
||||
|
||||
if (props.item.trackCount !== undefined) {
|
||||
parts.push(t('user.playlist.trackCount', { count: props.item.trackCount }));
|
||||
}
|
||||
|
||||
if (props.item.creator?.nickname) {
|
||||
parts.push(props.item.creator.nickname);
|
||||
}
|
||||
|
||||
return parts.join(' · ') || t('history.noDescription');
|
||||
};
|
||||
|
||||
const handleClick = () => {
|
||||
emit('click', props.item);
|
||||
};
|
||||
|
||||
const handleDelete = () => {
|
||||
emit('delete', props.item);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.playlist-item {
|
||||
@apply flex items-center px-2 py-2 rounded-xl cursor-pointer;
|
||||
@apply transition-all duration-200;
|
||||
@apply bg-light-100 dark:bg-dark-100;
|
||||
@apply hover:bg-light-200 dark:hover:bg-dark-200;
|
||||
@apply mb-2;
|
||||
|
||||
&-img {
|
||||
@apply flex items-center justify-center rounded-xl;
|
||||
@apply w-[60px] h-[60px] flex-shrink-0;
|
||||
@apply bg-light-300 dark:bg-dark-300;
|
||||
}
|
||||
|
||||
&-info {
|
||||
@apply ml-3 flex-1 min-w-0;
|
||||
}
|
||||
|
||||
&-name {
|
||||
@apply text-gray-900 dark:text-white text-base mb-1;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
@apply text-sm text-gray-500 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-count {
|
||||
@apply px-4 text-lg text-center min-w-[60px];
|
||||
@apply text-gray-600 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-delete {
|
||||
@apply cursor-pointer rounded-full border-2 w-8 h-8 flex justify-center items-center;
|
||||
@apply border-gray-400 dark:border-gray-600;
|
||||
@apply text-gray-600 dark:text-gray-400;
|
||||
@apply hover:border-red-500 hover:text-red-500;
|
||||
@apply transition-all;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
147
src/renderer/components/common/ResponsiveModal.vue
Normal file
147
src/renderer/components/common/ResponsiveModal.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<Transition name="fade">
|
||||
<div
|
||||
v-if="show"
|
||||
class="fixed inset-0 z-[1000] flex items-center justify-center md:items-center items-end"
|
||||
@click="handleMaskClick"
|
||||
>
|
||||
<!-- Overlay -->
|
||||
<div class="absolute inset-0 bg-black/40 backdrop-blur-sm transition-opacity"></div>
|
||||
|
||||
<!-- Content -->
|
||||
<Transition :name="isMobile ? 'slide-up' : 'scale-fade'">
|
||||
<div
|
||||
v-if="show"
|
||||
class="relative z-10 w-full bg-white dark:bg-[#1c1c1e] shadow-2xl overflow-hidden flex flex-col max-h-[85vh]"
|
||||
:class="[
|
||||
isMobile
|
||||
? 'rounded-t-[20px] pb-safe'
|
||||
: 'md:max-w-[720px] md:rounded-2xl'
|
||||
]"
|
||||
@click.stop
|
||||
>
|
||||
<!-- Header -->
|
||||
<div
|
||||
class="flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-white/5 shrink-0"
|
||||
>
|
||||
<h3 class="text-[15px] font-semibold text-gray-900 dark:text-white truncate">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<button
|
||||
class="p-1 -mr-1 rounded-full text-gray-400 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors"
|
||||
@click="close"
|
||||
>
|
||||
<i class="ri-close-line text-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Body -->
|
||||
<div class="flex-1 overflow-y-auto overscroll-contain px-4 py-3">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div
|
||||
v-if="$slots.footer"
|
||||
class="px-4 py-3 border-t border-gray-100 dark:border-white/5 shrink-0 bg-gray-50/50 dark:bg-white/5 backdrop-blur-xl"
|
||||
>
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean;
|
||||
title?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: boolean): void;
|
||||
(e: 'close'): void;
|
||||
}>();
|
||||
|
||||
const show = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
});
|
||||
|
||||
const isMobile = ref(false);
|
||||
|
||||
const checkMobile = () => {
|
||||
isMobile.value = window.innerWidth < 768;
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
show.value = false;
|
||||
emit('close');
|
||||
};
|
||||
|
||||
const handleMaskClick = () => {
|
||||
close();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('resize', checkMobile);
|
||||
});
|
||||
|
||||
// Prevent body scroll when modal is open
|
||||
watch(show, (val) => {
|
||||
if (val) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
} else {
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* PC Scale Fade Transition */
|
||||
.scale-fade-enter-active,
|
||||
.scale-fade-leave-active {
|
||||
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
|
||||
.scale-fade-enter-from,
|
||||
.scale-fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Mobile Slide Up Transition */
|
||||
.slide-up-enter-active,
|
||||
.slide-up-leave-active {
|
||||
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
||||
}
|
||||
|
||||
.slide-up-enter-from,
|
||||
.slide-up-leave-to {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
.pb-safe {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
</style>
|
||||
@@ -241,7 +241,8 @@ const handleUpdate = async () => {
|
||||
ia32: `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}/AlgerMusicPlayer-${version}-win-ia32.exe`
|
||||
},
|
||||
darwin: {
|
||||
all: `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}AlgerMusicPlayer-${version}-mac-universal.dmg`
|
||||
x64: `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}/AlgerMusicPlayer-${version}-x64.dmg`,
|
||||
arm64: `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}/AlgerMusicPlayer-${version}-arm64.dmg`
|
||||
},
|
||||
linux: {
|
||||
AppImage: `https://github.com/algerkong/AlgerMusicPlayer/releases/download/v${version}/AlgerMusicPlayer-${version}-linux-x64.AppImage`,
|
||||
@@ -253,9 +254,12 @@ const handleUpdate = async () => {
|
||||
|
||||
// 根据平台和架构选择对应的安装包
|
||||
if (platform === 'darwin') {
|
||||
// macOS
|
||||
const macAsset = assets.find((asset) => asset.name.includes('mac'));
|
||||
downloadUrl = macAsset?.browser_download_url || downUrls.darwin.all || '';
|
||||
// macOS - 根据芯片架构选择对应的 DMG
|
||||
const macArch = arch === 'arm64' ? 'arm64' : 'x64';
|
||||
const macAsset = assets.find(
|
||||
(asset) => asset.name.includes('mac') && asset.name.includes(macArch)
|
||||
);
|
||||
downloadUrl = macAsset?.browser_download_url || downUrls.darwin[macArch] || '';
|
||||
} else if (platform === 'win32') {
|
||||
// Windows
|
||||
const winAsset = assets.find(
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<template #content>
|
||||
<div class="song-item-content-compact">
|
||||
<div class="song-item-content-compact-wrapper">
|
||||
<div class="song-item-content-compact-title w-60 flex-shrink-0">
|
||||
<div class="song-item-content-compact-title">
|
||||
<n-ellipsis
|
||||
class="text-ellipsis"
|
||||
line-clamp="1"
|
||||
@@ -197,26 +197,26 @@ const formatDuration = (ms: number): string => {
|
||||
}
|
||||
|
||||
.song-item-content-compact {
|
||||
@apply flex-1 flex items-center gap-4;
|
||||
@apply flex-1 flex items-center gap-2;
|
||||
|
||||
&-wrapper {
|
||||
@apply flex-1 min-w-0 flex items-center;
|
||||
@apply flex-[2] flex items-center gap-2 min-w-0;
|
||||
}
|
||||
|
||||
&-title {
|
||||
@apply text-sm cursor-pointer text-gray-900 dark:text-white flex items-center;
|
||||
@apply flex-[2.5] min-w-0 text-sm cursor-pointer text-gray-900 dark:text-white;
|
||||
}
|
||||
|
||||
&-artist {
|
||||
@apply w-40 text-sm text-gray-500 dark:text-gray-400 ml-2 flex items-center;
|
||||
@apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-album {
|
||||
@apply w-32 flex items-center text-sm text-gray-500 dark:text-gray-400;
|
||||
@apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400;
|
||||
}
|
||||
|
||||
&-duration {
|
||||
@apply w-16 flex items-center text-sm text-gray-500 dark:text-gray-400 text-right;
|
||||
@apply w-14 flex-shrink-0 text-sm text-gray-500 dark:text-gray-400 justify-end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import { useI18n } from 'vue-i18n';
|
||||
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl, isElectron } from '@/utils';
|
||||
import { hasPermission } from '@/utils/auth';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -121,6 +122,8 @@ const renderSongPreview = () => {
|
||||
|
||||
// 下拉菜单选项
|
||||
const dropdownOptions = computed<MenuOption[]>(() => {
|
||||
const hasRealAuth = hasPermission(true);
|
||||
|
||||
const options: MenuOption[] = [
|
||||
{
|
||||
key: 'header',
|
||||
@@ -153,7 +156,8 @@ const dropdownOptions = computed<MenuOption[]>(() => {
|
||||
{
|
||||
label: t('songItem.menu.addToPlaylist'),
|
||||
key: 'addToPlaylist',
|
||||
icon: () => h('i', { class: 'iconfont ri-folder-add-line' })
|
||||
icon: () => h('i', { class: 'iconfont ri-folder-add-line' }),
|
||||
disabled: !hasRealAuth
|
||||
},
|
||||
{
|
||||
label: props.isFavorite ? t('songItem.menu.unfavorite') : t('songItem.menu.favorite'),
|
||||
@@ -162,6 +166,7 @@ const dropdownOptions = computed<MenuOption[]>(() => {
|
||||
h('i', {
|
||||
class: `iconfont ${props.isFavorite ? 'ri-heart-fill text-red-500' : 'ri-heart-line'}`
|
||||
})
|
||||
// 收藏功能不禁用,UID登录时可以本地收藏/取消收藏
|
||||
},
|
||||
{
|
||||
label: props.isDislike ? t('songItem.menu.undislike') : t('songItem.menu.dislike'),
|
||||
|
||||
205
src/renderer/components/cover/Cover3D.vue
Normal file
205
src/renderer/components/cover/Cover3D.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<div
|
||||
ref="coverContainer"
|
||||
class="cover-3d-container relative cursor-pointer"
|
||||
@mousemove="handleMouseMove"
|
||||
@mouseleave="handleMouseLeave"
|
||||
@mouseenter="handleMouseEnter"
|
||||
>
|
||||
<div ref="coverImage" class="cover-wrapper" :style="coverTransformStyle">
|
||||
<n-image :src="src" class="cover-image" lazy preview-disabled :object-fit="objectFit" />
|
||||
<div class="cover-shine" :style="shineStyle"></div>
|
||||
</div>
|
||||
<div v-if="loading" class="loading-overlay">
|
||||
<i class="ri-loader-4-line loading-icon"></i>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, ref } from 'vue';
|
||||
|
||||
interface Props {
|
||||
src: string;
|
||||
loading?: boolean;
|
||||
maxTilt?: number;
|
||||
scale?: number;
|
||||
shineIntensity?: number;
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none';
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
loading: false,
|
||||
maxTilt: 12,
|
||||
scale: 1.03,
|
||||
shineIntensity: 0.25,
|
||||
objectFit: 'cover',
|
||||
disabled: false
|
||||
});
|
||||
|
||||
// 3D视差效果相关
|
||||
const coverContainer = ref<HTMLElement | null>(null);
|
||||
const coverImage = ref<HTMLElement | null>(null);
|
||||
const mouseX = ref(0.5);
|
||||
const mouseY = ref(0.5);
|
||||
const isHovering = ref(false);
|
||||
const rafId = ref<number | null>(null);
|
||||
|
||||
// 3D视差效果计算
|
||||
const coverTransformStyle = computed(() => {
|
||||
if (!isHovering.value || props.disabled) {
|
||||
return {
|
||||
transform: 'perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1)',
|
||||
transition: 'transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)'
|
||||
};
|
||||
}
|
||||
|
||||
const tiltX = Math.round((mouseY.value - 0.5) * props.maxTilt * 100) / 100;
|
||||
const tiltY = Math.round((mouseX.value - 0.5) * -props.maxTilt * 100) / 100;
|
||||
|
||||
return {
|
||||
transform: `perspective(1000px) rotateX(${tiltX}deg) rotateY(${tiltY}deg) scale(${props.scale})`,
|
||||
transition: 'none'
|
||||
};
|
||||
});
|
||||
|
||||
// 光泽效果计算
|
||||
const shineStyle = computed(() => {
|
||||
if (!isHovering.value || props.disabled) {
|
||||
return {
|
||||
opacity: 0,
|
||||
background: 'transparent',
|
||||
transition: 'opacity 0.3s ease-out'
|
||||
};
|
||||
}
|
||||
|
||||
const shineX = Math.round(mouseX.value * 100);
|
||||
const shineY = Math.round(mouseY.value * 100);
|
||||
|
||||
return {
|
||||
opacity: props.shineIntensity,
|
||||
background: `radial-gradient(200px circle at ${shineX}% ${shineY}%, rgba(255,255,255,0.3), transparent 50%)`,
|
||||
transition: 'none'
|
||||
};
|
||||
});
|
||||
|
||||
// 使用 requestAnimationFrame 优化鼠标事件
|
||||
const updateMousePosition = (x: number, y: number) => {
|
||||
if (rafId.value) {
|
||||
cancelAnimationFrame(rafId.value);
|
||||
}
|
||||
|
||||
rafId.value = requestAnimationFrame(() => {
|
||||
// 只在位置有显著变化时更新,减少不必要的重绘
|
||||
const deltaX = Math.abs(mouseX.value - x);
|
||||
const deltaY = Math.abs(mouseY.value - y);
|
||||
|
||||
if (deltaX > 0.01 || deltaY > 0.01) {
|
||||
mouseX.value = x;
|
||||
mouseY.value = y;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 3D视差效果的鼠标事件处理
|
||||
const handleMouseMove = (event: MouseEvent) => {
|
||||
if (!coverContainer.value || !isHovering.value || props.disabled) return;
|
||||
|
||||
const rect = coverContainer.value.getBoundingClientRect();
|
||||
const x = Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width));
|
||||
const y = Math.max(0, Math.min(1, (event.clientY - rect.top) / rect.height));
|
||||
|
||||
updateMousePosition(x, y);
|
||||
};
|
||||
|
||||
const handleMouseEnter = () => {
|
||||
if (!props.disabled) {
|
||||
isHovering.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const handleMouseLeave = () => {
|
||||
isHovering.value = false;
|
||||
if (rafId.value) {
|
||||
cancelAnimationFrame(rafId.value);
|
||||
rafId.value = null;
|
||||
}
|
||||
// 平滑回到中心位置
|
||||
updateMousePosition(0.5, 0.5);
|
||||
};
|
||||
|
||||
// 清理资源
|
||||
onBeforeUnmount(() => {
|
||||
if (rafId.value) {
|
||||
cancelAnimationFrame(rafId.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover-3d-container {
|
||||
@apply w-full h-full;
|
||||
}
|
||||
|
||||
/* 3D视差效果样式 */
|
||||
.cover-wrapper {
|
||||
@apply relative w-full h-full rounded-xl overflow-hidden;
|
||||
transform-style: preserve-3d;
|
||||
will-change: transform;
|
||||
backface-visibility: hidden;
|
||||
transform: translateZ(0); /* 强制硬件加速 */
|
||||
}
|
||||
|
||||
.cover-image {
|
||||
@apply w-full h-full;
|
||||
border-radius: inherit;
|
||||
transform: translateZ(0); /* 强制硬件加速 */
|
||||
}
|
||||
|
||||
.cover-shine {
|
||||
@apply absolute inset-0 pointer-events-none rounded-xl;
|
||||
mix-blend-mode: overlay;
|
||||
z-index: 1;
|
||||
will-change: background, opacity;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
/* 为封面容器添加阴影效果 */
|
||||
.cover-3d-container:hover .cover-wrapper {
|
||||
filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.25));
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.loading-overlay {
|
||||
@apply absolute inset-0 flex items-center justify-center rounded-xl;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.loading-icon {
|
||||
font-size: 48px;
|
||||
color: white;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
/* 移动端禁用3D效果 */
|
||||
@media (max-width: 768px) {
|
||||
.cover-wrapper {
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.cover-shine {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -130,14 +130,13 @@ import { computed, onMounted, ref, watchEffect } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { getDayRecommend, getHotSinger } from '@/api/home';
|
||||
import { getHotSinger } from '@/api/home';
|
||||
import { getListDetail } from '@/api/list';
|
||||
import { getMusicDetail } from '@/api/music';
|
||||
import { getUserPlaylist } from '@/api/user';
|
||||
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
|
||||
import { useArtist } from '@/hooks/useArtist';
|
||||
import { usePlayerStore, useUserStore } from '@/store';
|
||||
import { IDayRecommend } from '@/types/day_recommend';
|
||||
import { usePlayerStore, useRecommendStore, useUserStore } from '@/store';
|
||||
import { Playlist } from '@/types/list';
|
||||
import type { IListDetail } from '@/types/listDetail';
|
||||
import { SongResult } from '@/types/music';
|
||||
@@ -152,13 +151,21 @@ import {
|
||||
|
||||
const userStore = useUserStore();
|
||||
const playerStore = usePlayerStore();
|
||||
const recommendStore = useRecommendStore();
|
||||
const router = useRouter();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 歌手信息
|
||||
const hotSingerData = ref<IHotSinger>();
|
||||
const dayRecommendData = ref<IDayRecommend>();
|
||||
const dayRecommendData = computed(() => {
|
||||
if (recommendStore.dailyRecommendSongs.length > 0) {
|
||||
return {
|
||||
dailySongs: recommendStore.dailyRecommendSongs
|
||||
};
|
||||
}
|
||||
return null;
|
||||
});
|
||||
const userPlaylist = ref<Playlist[]>([]);
|
||||
|
||||
// 为歌单弹窗添加的状态
|
||||
@@ -230,22 +237,8 @@ onMounted(async () => {
|
||||
loadNonUserData();
|
||||
});
|
||||
|
||||
// 提取每日推荐加载逻辑到单独的函数
|
||||
const loadDayRecommendData = async () => {
|
||||
try {
|
||||
const {
|
||||
data: { data: dayRecommend }
|
||||
} = await getDayRecommend();
|
||||
const dayRecommendSource = dayRecommend as unknown as IDayRecommend;
|
||||
dayRecommendData.value = {
|
||||
...dayRecommendSource,
|
||||
dailySongs: dayRecommendSource.dailySongs.filter(
|
||||
(song: any) => !playerStore.dislikeList.includes(song.id)
|
||||
)
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('获取每日推荐失败:', error);
|
||||
}
|
||||
await recommendStore.fetchDailyRecommendSongs();
|
||||
};
|
||||
|
||||
// 加载不需要登录的数据
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user