melody-tui 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. melody_tui-0.4.3/.github/workflows/ci.yml +62 -0
  2. melody_tui-0.4.3/.github/workflows/publish.yml +39 -0
  3. melody_tui-0.4.3/.gitignore +7 -0
  4. melody_tui-0.4.3/AGENTS.md +62 -0
  5. melody_tui-0.4.3/CHANGELOG.md +129 -0
  6. melody_tui-0.4.3/CONTEXT.md +27 -0
  7. melody_tui-0.4.3/LICENSE +674 -0
  8. melody_tui-0.4.3/PKG-INFO +257 -0
  9. melody_tui-0.4.3/README.md +239 -0
  10. melody_tui-0.4.3/docs/agents/domain.md +7 -0
  11. melody_tui-0.4.3/docs/agents/issue-tracker.md +11 -0
  12. melody_tui-0.4.3/docs/agents/triage-labels.md +9 -0
  13. melody_tui-0.4.3/docs/artist-and-browse-requirements.md +56 -0
  14. melody_tui-0.4.3/docs/artist-and-browse-spec.md +121 -0
  15. melody_tui-0.4.3/docs/artist-preview.png +0 -0
  16. melody_tui-0.4.3/docs/artist-preview.svg +145 -0
  17. melody_tui-0.4.3/docs/browse-pagination-day.png +0 -0
  18. melody_tui-0.4.3/docs/browse-pagination-night.png +0 -0
  19. melody_tui-0.4.3/docs/create-playlist-preview.png +0 -0
  20. melody_tui-0.4.3/docs/create-playlist-preview.svg +161 -0
  21. melody_tui-0.4.3/docs/history-preview.svg +157 -0
  22. melody_tui-0.4.3/docs/login-service-error.svg +152 -0
  23. melody_tui-0.4.3/docs/lyrics-preview.png +0 -0
  24. melody_tui-0.4.3/docs/lyrics-preview.svg +160 -0
  25. melody_tui-0.4.3/docs/netease-artist-api.md +37 -0
  26. melody_tui-0.4.3/docs/netease-integration.md +133 -0
  27. melody_tui-0.4.3/docs/netease-official-api.md +55 -0
  28. melody_tui-0.4.3/docs/netease-setup.md +192 -0
  29. melody_tui-0.4.3/docs/platform-switch.svg +153 -0
  30. melody_tui-0.4.3/docs/playback-day-preview.svg +351 -0
  31. melody_tui-0.4.3/docs/playback-preview.png +0 -0
  32. melody_tui-0.4.3/docs/playback-preview.svg +351 -0
  33. melody_tui-0.4.3/docs/playback-unavailable.png +0 -0
  34. melody_tui-0.4.3/docs/python-project-structure.md +59 -0
  35. melody_tui-0.4.3/docs/qq-artist-api.md +46 -0
  36. melody_tui-0.4.3/docs/queue-preview.svg +157 -0
  37. melody_tui-0.4.3/docs/search-likes-preview.png +0 -0
  38. melody_tui-0.4.3/docs/search-likes-preview.svg +145 -0
  39. melody_tui-0.4.3/docs/tui-day-preview.png +0 -0
  40. melody_tui-0.4.3/docs/tui-day-preview.svg +158 -0
  41. melody_tui-0.4.3/docs/tui-preview.png +0 -0
  42. melody_tui-0.4.3/docs/tui-preview.svg +158 -0
  43. melody_tui-0.4.3/pyproject.toml +51 -0
  44. melody_tui-0.4.3/scripts/check_install.sh +37 -0
  45. melody_tui-0.4.3/scripts/check_live_ui.py +196 -0
  46. melody_tui-0.4.3/scripts/probe_qq_artist.py +71 -0
  47. melody_tui-0.4.3/src/music_tui/__init__.py +1 -0
  48. melody_tui-0.4.3/src/music_tui/app.py +2439 -0
  49. melody_tui-0.4.3/src/music_tui/artists.py +124 -0
  50. melody_tui-0.4.3/src/music_tui/artwork.py +118 -0
  51. melody_tui-0.4.3/src/music_tui/history_screen.py +201 -0
  52. melody_tui-0.4.3/src/music_tui/likes.py +94 -0
  53. melody_tui-0.4.3/src/music_tui/models.py +133 -0
  54. melody_tui-0.4.3/src/music_tui/netease_config.py +72 -0
  55. melody_tui-0.4.3/src/music_tui/netease_enhanced_setup.py +341 -0
  56. melody_tui-0.4.3/src/music_tui/netease_key_input.py +63 -0
  57. melody_tui-0.4.3/src/music_tui/netease_setup.py +277 -0
  58. melody_tui-0.4.3/src/music_tui/playback_queue.py +411 -0
  59. melody_tui-0.4.3/src/music_tui/playback_screen.py +425 -0
  60. melody_tui-0.4.3/src/music_tui/playback_session.py +288 -0
  61. melody_tui-0.4.3/src/music_tui/player.py +135 -0
  62. melody_tui-0.4.3/src/music_tui/screens.py +410 -0
  63. melody_tui-0.4.3/src/music_tui/scripts/setup-netease-enhanced.sh +249 -0
  64. melody_tui-0.4.3/src/music_tui/scripts/setup-netease.sh +282 -0
  65. melody_tui-0.4.3/src/music_tui/session.py +167 -0
  66. melody_tui-0.4.3/src/music_tui/sources/__init__.py +91 -0
  67. melody_tui-0.4.3/src/music_tui/sources/lyrics.py +54 -0
  68. melody_tui-0.4.3/src/music_tui/sources/netease.py +406 -0
  69. melody_tui-0.4.3/src/music_tui/sources/netease_official.py +302 -0
  70. melody_tui-0.4.3/src/music_tui/sources/netease_openapi.py +179 -0
  71. melody_tui-0.4.3/src/music_tui/sources/qqmusic.py +411 -0
  72. melody_tui-0.4.3/src/music_tui/themes.py +127 -0
  73. melody_tui-0.4.3/src/music_tui/transport.py +65 -0
  74. melody_tui-0.4.3/tests/test_app.py +828 -0
  75. melody_tui-0.4.3/tests/test_app_sessions.py +262 -0
  76. melody_tui-0.4.3/tests/test_appearance.py +258 -0
  77. melody_tui-0.4.3/tests/test_artist_browser.py +348 -0
  78. melody_tui-0.4.3/tests/test_artwork.py +161 -0
  79. melody_tui-0.4.3/tests/test_cli.py +174 -0
  80. melody_tui-0.4.3/tests/test_credentials.py +20 -0
  81. melody_tui-0.4.3/tests/test_history.py +165 -0
  82. melody_tui-0.4.3/tests/test_library.py +102 -0
  83. melody_tui-0.4.3/tests/test_library_actions.py +412 -0
  84. melody_tui-0.4.3/tests/test_listening_pages.py +290 -0
  85. melody_tui-0.4.3/tests/test_lyrics.py +112 -0
  86. melody_tui-0.4.3/tests/test_navigation.py +142 -0
  87. melody_tui-0.4.3/tests/test_netease.py +629 -0
  88. melody_tui-0.4.3/tests/test_netease_artists.py +95 -0
  89. melody_tui-0.4.3/tests/test_netease_config.py +161 -0
  90. melody_tui-0.4.3/tests/test_netease_enhanced_setup.py +384 -0
  91. melody_tui-0.4.3/tests/test_netease_official.py +366 -0
  92. melody_tui-0.4.3/tests/test_netease_openapi.py +246 -0
  93. melody_tui-0.4.3/tests/test_netease_setup.py +219 -0
  94. melody_tui-0.4.3/tests/test_platform_switch.py +276 -0
  95. melody_tui-0.4.3/tests/test_playback_features.py +442 -0
  96. melody_tui-0.4.3/tests/test_playback_queue.py +252 -0
  97. melody_tui-0.4.3/tests/test_playback_recovery.py +97 -0
  98. melody_tui-0.4.3/tests/test_playback_screen.py +422 -0
  99. melody_tui-0.4.3/tests/test_playback_session.py +141 -0
  100. melody_tui-0.4.3/tests/test_player.py +119 -0
  101. melody_tui-0.4.3/tests/test_playlist_ui.py +259 -0
  102. melody_tui-0.4.3/tests/test_qq_artists.py +119 -0
  103. melody_tui-0.4.3/tests/test_quality.py +247 -0
  104. melody_tui-0.4.3/tests/test_quality_fallback.py +296 -0
  105. melody_tui-0.4.3/tests/test_saved_platform.py +125 -0
  106. melody_tui-0.4.3/tests/test_screens.py +278 -0
  107. melody_tui-0.4.3/tests/test_search_likes.py +248 -0
  108. melody_tui-0.4.3/tests/test_search_likes_ui.py +209 -0
  109. melody_tui-0.4.3/tests/test_secret_input.py +138 -0
  110. melody_tui-0.4.3/tests/test_session.py +231 -0
  111. melody_tui-0.4.3/tests/test_sorting.py +155 -0
  112. melody_tui-0.4.3/tests/test_source_metadata.py +30 -0
  113. melody_tui-0.4.3/tests/test_theme_detection.py +112 -0
  114. melody_tui-0.4.3/tests/test_transport.py +110 -0
  115. melody_tui-0.4.3/uv.lock +1191 -0
@@ -0,0 +1,62 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - release-v*
8
+ - bugfix-*
9
+ pull_request:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ check:
16
+ name: Python 3.13 / ${{ matrix.os }}
17
+ runs-on: ${{ matrix.os }}
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-latest, macos-latest]
22
+ defaults:
23
+ run:
24
+ shell: bash
25
+ steps:
26
+ - uses: actions/checkout@v7.0.1
27
+ with:
28
+ persist-credentials: false
29
+ - uses: actions/setup-python@v7.0.0
30
+ with:
31
+ python-version: "3.13"
32
+ - uses: astral-sh/setup-uv@v10.3.0
33
+ with:
34
+ version: "0.13.0"
35
+ enable-cache: true
36
+ - name: Install mpv on Linux
37
+ if: runner.os == 'Linux'
38
+ run: |
39
+ sudo apt-get update
40
+ sudo apt-get install -y mpv
41
+ - name: Install mpv on macOS
42
+ if: runner.os == 'macOS'
43
+ run: brew install mpv
44
+ - name: Install locked dependencies
45
+ run: uv sync --locked --python 3.13
46
+ - name: Check formatting
47
+ run: uv run --no-sync black --check src tests
48
+ - name: Lint
49
+ run: uv run --no-sync ruff check src tests
50
+ - name: Test
51
+ run: uv run --no-sync pytest -q
52
+ - name: Build distributions
53
+ run: uv build
54
+ - name: Verify installed wheel outside the repository
55
+ run: bash scripts/check_install.sh
56
+ - name: Upload distributions
57
+ if: runner.os == 'Linux'
58
+ uses: actions/upload-artifact@v7.0.2
59
+ with:
60
+ name: distributions
61
+ path: dist/*
62
+ if-no-files-found: error
@@ -0,0 +1,39 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ tag:
9
+ description: Existing GitHub Release tag to publish
10
+ required: true
11
+ type: string
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ publish:
18
+ name: Publish release distributions
19
+ runs-on: ubuntu-latest
20
+ environment:
21
+ name: pypi
22
+ url: https://pypi.org/project/melody-tui/
23
+ permissions:
24
+ contents: read
25
+ id-token: write
26
+ steps:
27
+ - uses: astral-sh/setup-uv@v10.3.0
28
+ with:
29
+ version: "0.13.0"
30
+ - name: Download GitHub Release distributions
31
+ env:
32
+ GH_TOKEN: ${{ github.token }}
33
+ GH_REPO: ${{ github.repository }}
34
+ RELEASE_TAG: ${{ inputs.tag || github.event.release.tag_name }}
35
+ run: |
36
+ gh release download "$RELEASE_TAG" --dir dist \
37
+ --pattern 'melody_tui-*.whl' --pattern 'melody_tui-*.tar.gz'
38
+ - name: Publish to PyPI with Trusted Publishing
39
+ run: uv publish --trusted-publishing always dist/*
@@ -0,0 +1,7 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ *.egg-info/
6
+ dist/
7
+ .codegraph/
@@ -0,0 +1,62 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ Music TUI uses distribution name `melody-tui`, command `music-tui`, and import package `music_tui`. QQ Music and NetEase Cloud Music are supported.
6
+
7
+ Source lives in `src/music_tui/`: `app.py` owns the Textual interface and playback queue, `screens.py` contains feature dialogs, `playback_screen.py` shows the independent player page, `history_screen.py` displays recent songs and sources, `session.py` saves preferences and account-scoped sessions and history, `models.py` defines shared values, `sources/qqmusic.py` and `sources/netease.py` own platform access and credentials, and `player.py` controls mpv through a Unix socket. Tests live in `tests/`, grouped by behavior. `docs/tui-preview.png` shows the interface. `pyproject.toml` declares dependencies; `uv.lock` pins versions. Consult `docs/python-project-structure.md` when changing module boundaries.
8
+
9
+ ## Build, Test, and Development Commands
10
+
11
+ Use Python 3.13+, uv, and mpv. On macOS: `brew install uv mpv`.
12
+
13
+ - `uv sync --locked`: install locked dependencies.
14
+ - `uv run music-tui`: start the last used platform, or QQ Music on first use.
15
+ - `uv run music-tui --source netease`: start NetEase with the local API service described in `README.md`.
16
+ - `uv build`: build distribution archives with Hatchling.
17
+ - `bash scripts/check_install.sh`: verify the built wheel in a new environment outside the repository.
18
+ - `uv run black src tests`: format Python after every code change.
19
+ - `uv run black --check src tests`: verify formatting before delivery.
20
+ - `uv run ruff check src tests`: check configured lint rules.
21
+ - `uv run pytest -q`: run all tests.
22
+ - `uv run pytest -q tests/test_app.py`: run interface tests.
23
+
24
+ ## Coding Style & Naming Conventions
25
+
26
+ Use four-space indentation and a 100-character line limit. Use `snake_case` for functions and variables, `PascalCase` for classes, and `UPPER_CASE` for constants. Follow adjacent annotations and async patterns. Keep UI, music access, and mpv lifecycle responsibilities separate.
27
+
28
+ Black is the formatter; Ruff is the linter. After each Python change, run Black. Before delivery, check formatting and lint. Every Python file needs a module docstring. Every function and method, including test helpers, needs a concise docstring explaining purpose and relevant behavior.
29
+
30
+ ## Testing Guidelines
31
+
32
+ Use pytest and pytest-asyncio with automatic asyncio mode. Name files `test_*.py` and functions `test_<behavior>`. Exercise UI through Textual's `app.run_test()` and pilot controls. Use fake music responses for offline tests. Player integration tests require mpv and generate local silent WAV files. Cover changed behavior and important failures; no numeric coverage threshold is configured.
33
+
34
+ ## Commit & Pull Request Guidelines
35
+
36
+ Keep `main` as the stable integration branch. Use `release-v<major>.<minor>.<patch>` for new features and release preparation for that version, for example `release-v0.2.0`. Create a separate `bugfix-<short-kebab-case-description>` branch from `main` for each defect, for example `bugfix-playback-retry`. Integrate completed fixes into `main` and the active release branch when applicable. Check the current branch before editing code and keep each branch's changes focused on its purpose.
37
+
38
+ Use concise, imperative commit subjects. PRs should describe resulting behavior, link relevant issues, and report checks. Include 80×24 terminal screenshots for layout changes.
39
+
40
+ Every completed update includes publishing a new version and updating this machine's global installation with `uv tool install --force <released-wheel>`. Use the version requested by the user when specified. Verify `music-tui -v` and `music-tui --version` from outside the checkout match the released version before reporting completion.
41
+
42
+ ## Credentials & Configuration
43
+
44
+ QQ credentials remain at `~/.local/share/qqmusic-tui/credential.json`, respecting `XDG_DATA_HOME`. Preserve `0600` permissions. NetEase cookies live at `~/.local/share/music-tui/netease/netease-credential.json` with `0600` permissions. The NetEase API service must run with `ENABLE_GENERAL_UNBLOCK=false`. Keep account data out of commits and fixtures.
45
+
46
+ ## Agent Collaboration
47
+
48
+ Delegate independent parallel tasks to sub-agents with explicit inputs, outputs, file ownership, and completion criteria. The main agent integrates and verifies results. Keep tasks with shared state or sequential decisions together.
49
+
50
+ ## Agent skills
51
+
52
+ ### Issue tracker
53
+
54
+ 规格与任务使用 GitHub Issues(FlyTOmeLight/music-tui)。发布、读取和任务依赖约定见 `docs/agents/issue-tracker.md`。
55
+
56
+ ### Triage labels
57
+
58
+ 使用默认五种状态标签;角色与标签映射见 `docs/agents/triage-labels.md`。
59
+
60
+ ### Domain docs
61
+
62
+ 项目采用单一领域上下文。探索和编写规格前读取 `CONTEXT.md` 与相关 ADR;详细约定见 `docs/agents/domain.md`。
@@ -0,0 +1,129 @@
1
+ # 更新记录
2
+
3
+ ## v0.4.3
4
+
5
+ - PyPI 发布包改名为 `melody-tui`,保留 `music-tui` 命令、`music_tui` 导入包及本机账号与配置目录。
6
+ - 更新安装、版本读取及打包验证;GitHub Release 产物通过 Trusted Publishing 自动发布到 PyPI。
7
+
8
+ ## v0.4.2
9
+
10
+ - 重写 README,补充 PyPI 安装与升级,按首次登录、网易云配置、日常操作、快捷键和常见问题组织说明。
11
+ - 发布包包含 README 项目介绍和仓库、反馈、更新记录链接;修正网易云配置指南中过时的官方平台菜单说明。
12
+
13
+ ## v0.4.1
14
+
15
+ - 喜欢状态刷新开始时立即显示未知标记 `?`;查询失败后不再沿用旧缓存。再次点击或按 `s` 时先查询真实状态,查询失败不会提交修改。
16
+ - 写入失败仍保留已确认状态;刷新与正在提交的喜欢操作保持串行,不让迟到的写入重新填充已失效的缓存。
17
+
18
+ ## v0.4.0
19
+
20
+ - QQ 与网易云 Enhanced 新增歌手详情页,支持头像、简介及全列表热门/最新排序;可点击每位歌手名进入,键盘按 `i` 选择合唱歌手。
21
+ - 从歌手页选歌后按所选顺序跨页播放,歌手来源贯通最近播放、定位、手动待播与播放会话恢复;浏览或切换排序不改变当前队列。
22
+ - 搜索结果显示可点击的喜欢状态,与 `s` 键同步;未登录或查询失败显示未知,修改失败保留确认值,账号与平台切换隔离状态。
23
+ - 主界面底部新增上一首、暂停/继续、下一首按钮,保留快捷键及 80×24 终端布局。
24
+ - 实测并修正 QQ 歌手歌曲分页的数量参数,记录两平台排序与分页接口依据。
25
+
26
+ ## v0.3.8
27
+
28
+ - 播放队列集中管理手动待播优先级、返回原列表、稳定身份编辑、单曲循环和失败导航重试,界面不再直接修改队列与随机历史。
29
+ - 队列返回只读视图与导航结果;播放会话由队列导出独立快照,保持现有文件格式,恢复时复制可变数据。
30
+ - 明确区分重播当前歌曲和重试失败导航,保留切换音质时的歌曲、进度与暂停状态;已结束队列不被 F5 重播。
31
+ - 队列规则改为直接通过队列 interface 测试,保留界面快捷键、音频、事件、导航并发和会话恢复的集成测试。
32
+
33
+ ## v0.3.7
34
+
35
+ - 加载歌曲期间保留 mpv 的结束与解码错误事件,避免无声时仍显示播放,或歌曲结束后未切下一首。
36
+ - F5 支持在首次选歌前恢复启动失败或已退出的播放器;重试按钮在播放器未就绪时可用。
37
+ - 网易云 Enhanced 扫码使用独立 Cookie 会话,验证和保存凭据成功后才切换账号;失败或取消保留原账号。
38
+ - 修改本机服务端口或运行参数后,启动命令会更新已注册的 launchd 服务;相同配置重复启动保持不变。
39
+ - 将队列分页、随机导航和加载事件管理提取到 `playback_queue.py`;会话类型、编解码和恢复校验集中到 `playback_session.py`,沿用现有会话文件格式。
40
+ - 新增加载期间事件、无歌曲时播放器恢复、账号切换失败、后台配置更新及跨页会话恢复的回归测试。
41
+
42
+ ## v0.3.6
43
+
44
+ - 移除玻璃主题、`Ctrl+F9` 快捷键、终端磨砂设置说明和预览,仅保留日间、夜间和跟随系统三种主题设置。
45
+ - 已保存的不支持主题设置改为跟随系统,避免升级后启动失败。
46
+
47
+ ## v0.3.5
48
+
49
+ - 新增 `music-glass` 玻璃主题,沿用终端默认底色,以细边框和焦点高亮区分面板;浏览、播放、最近及弹窗统一配色。
50
+ - `Ctrl+F9` 打开玻璃主题,再次按下恢复原来的昼夜设置;主题选择会保存。`F9` 手动切换昼夜,`Shift+F9` 恢复跟随系统。
51
+ - README 增加 iTerm2 透明度与背景模糊设置说明,由终端提供实际磨砂效果。
52
+
53
+ ## v0.3.4
54
+
55
+ - 网易云 Enhanced 播放失败时区分接口结果码、无播放地址、仅试听、音质不匹配和缺少歌曲音源,保留具体原因,不再推测会员权限。
56
+ - 平台选择界面移除网易云官方入口和说明,仅显示 QQ 音乐与网易云 Enhanced;已有命令行接入保持可用。
57
+
58
+ ## v0.3.3
59
+
60
+ - 获取音源中和失败后,浏览页底部保留歌曲名、歌手,失败后显示 F5 重试和 N 下一首。
61
+ - 所有音质不可用时保留标准档的具体原因和 QQ 接口结果码,去除固定的会员权限推测。
62
+ - 修复退出时系统主题检测仍更新已关闭页面的异步错误。
63
+
64
+ ## v0.3.2
65
+
66
+ - 浏览页去除播放器、状态行和底栏之间重复的播放提示,状态行保留加载结果及错误。
67
+ - 歌曲列表新增「[ 上一页」「下一页 ]」按钮,明确区分两个英文方括号按键;首尾页禁用不可用方向。
68
+ - 矮窗口压缩搜索和筛选框,避免歌单页的翻页按钮挤入播放器区域。
69
+
70
+ ## v0.3.1
71
+
72
+ - 新增 `music-tui -v` 和 `music-tui --version`,输出当前安装版本后退出。
73
+ - wheel 安装验证检查两个版本参数;发布收尾增加本机全局安装更新与版本核验。
74
+
75
+ ## v0.3.0
76
+
77
+ ### 界面与歌单
78
+
79
+ - 重整浏览、播放和最近页面的导航与昼夜配色。默认跟随系统外观,`F9` 手动切换,`Shift+F9` 恢复跟随;设置会保存。
80
+ - 播放页通过概览、歌词和队列页签展示内容,歌词和队列不再使用弹窗。播放控制改为单行紧凑按钮,随终端宽度并排、上下排列或折为两列。
81
+ - 播放概览展示真实歌曲封面,宽屏放大、窄屏缩小;普通终端使用真彩半块字符,封面加载失败不影响播放。
82
+ - 歌曲列表支持当前页按歌曲、歌手、时长排序;歌单侧栏支持按名称或累计播放量排序。排序保留歌曲身份,播放队列仍按来源顺序运行。
83
+ - QQ 音乐和网易云 Enhanced 支持新建歌单,以及新建后直接加入当前歌曲;播放页可把当前播放歌曲加入歌单。
84
+ - 网易云官方后端支持把歌曲加入已有的自建歌单,暂不支持新建歌单。
85
+
86
+ ### 播放与修复
87
+
88
+ - 当前歌曲的首选音质不可用时,按档位依次尝试至标准音质,显示实际档位和切换提示。保留首选音质,下一首仍从首选档开始;重载保留进度和暂停状态。
89
+ - QQ 音源文件返回 404 或 410 时继续尝试下一档。连接超时、登录、服务端及播放器错误保持错误提示;所有档位不可用时不自动跳过歌曲。
90
+ - 修复歌单排序与刷新并发时打开错误歌单、歌单写入过程中切换登录,以及平台切换后显示旧账号页面的问题。
91
+ - 修复单行按钮焦点遮住文字、长歌曲信息被裁切,以及旧歌词或队列请求覆盖新歌曲的问题。
92
+ - 修复系统外观读取失败的异步提示覆盖播放错误状态的问题。
93
+
94
+ ### 验证与接入范围
95
+
96
+ - QQ 真实账号只读验证覆盖歌单、搜索、完整歌曲播放、音质自动降档、封面、歌词、暂停/继续和四种终端尺寸;可使用 `scripts/check_live_ui.py` 复跑。
97
+ - 歌单创建及添加的成功与失败流程使用离线响应验证,未执行真实账号写入。
98
+ - 个人单曲播放次数尚未提供;不接入需另行申请开通的腾讯 IoT 音乐服务。
99
+ - Python、uv、mpv 和网易云本机服务的系统要求沿用 v0.2.0。
100
+
101
+ ## v0.2.0
102
+
103
+ ### 新增功能
104
+
105
+ - 手动待播队列:浏览歌曲时可追加待播,F3 实时显示队列,支持删除、重排和清空手动待播项。手动歌曲听完后继续原歌单或搜索结果,分页、筛选和浏览保持独立。
106
+ - 播放恢复:重试原来的失败歌曲,重新获取播放地址;mpv 退出后可在应用内重建播放器,保留最近记录的进度、暂停状态和音量。
107
+ - 音频加载使用 mpv 命名参数,支持 Linux 发行版与 macOS 上不同版本的 mpv。
108
+ - 播放会话与偏好:按平台保存音量、音质和播放模式,按平台与账号保存队列、手动待播、筛选结果、随机历史和进度。启动后由用户主动继续上次会话。
109
+ - 同步歌词与译文:支持逐行显示、高亮当前歌词,无时间歌词可滚动阅读。
110
+ - 喜欢与添加到歌单:QQ 音乐和网易云 Enhanced 支持喜欢、取消喜欢,以及把选中歌曲加入已有的可写歌单。
111
+ - 最近播放:F8 查看当前账号最近播放的 100 首歌曲,同一歌曲重播后移至列表前方;可重播单曲、打开原来源,并切换查看最近来源与歌单。
112
+ - 独立播放页:F7 集中查看当前歌曲、真实播放状态、进度、音量、音质、模式、来源和下一首,提供常用播放控制。
113
+ - macOS 网易云后台服务:由 launchd 守护 Enhanced 服务,支持启动、状态查询和停止;关闭终端后继续运行,重复启动不创建多个服务。
114
+ - 快捷键帮助、返回当前歌曲、刷新当前列表,以及歌曲区域的 PageUp / PageDown 翻页。
115
+ - GitHub Actions:main、release-v*、bugfix-* 的提交和 Pull Request 自动执行 Linux/macOS 检查、全量测试、构建及全新环境 wheel 安装验证。
116
+
117
+ ### 接入与系统要求
118
+
119
+ - 需要 Python 3.13+、uv 和 mpv;支持 macOS 和 Linux。音频播放使用本机 Unix socket。
120
+ - 网易云 Enhanced 本机服务需要 Node.js 22+ 和 npx,固定使用 `@neteasecloudmusicapienhanced/api@4.41.1`。后台托管命令目前支持 macOS;其他系统可手动运行服务,已有远端服务无需本机 Node.js。
121
+ - Enhanced 本机服务绑定 `127.0.0.1`,禁用全局解锁和代理功能。macOS 服务在当前登录会话运行,注销或重启后需要再次启动。
122
+ - 网易云官方接入保留为可选后端,需要已获批的应用与设备配置;暂不支持歌词、喜欢状态查询和歌单写操作,会明确提示不支持,不自动切换后端。
123
+ - 播放权限和音质由平台授权决定;不自动跳过权限错误、不降低音质。账号凭证与会话文件保持 `0600` 权限,会话不保存 Cookie 或播放地址。
124
+
125
+ ### 验证范围
126
+
127
+ - 功能测试使用离线音乐响应;mpv 集成测试播放本地生成的静音音频。
128
+ - 发布包验证从 wheel 安装到全新环境,并在仓库目录之外检查包版本、导入路径和 `music-tui --help`。
129
+ - 新增喜欢、歌单写入和歌词功能未进行真实账号写入验收。
@@ -0,0 +1,27 @@
1
+ # Music TUI
2
+
3
+ 这里记录播放器的领域用语,用于说明歌曲顺序、来源与恢复的含义。
4
+
5
+ ## Language
6
+
7
+ **播放队列**:一次选歌后形成的原列表及其手动待播歌曲,决定后续播放顺序。浏览其他列表不会改变它。
8
+
9
+ **原列表**:建立播放队列时选中的歌单、搜索结果、筛选结果或歌手歌曲列表;手动待播播放完后继续这个列表。
10
+
11
+ **手动待播**:用户主动插入的歌曲,优先于原列表的后续歌曲,并保留添加时的来源。
12
+
13
+ **当前手动歌曲**:已经从手动待播中取出、正在播放或等待重试的歌曲;它不改变原列表的位置。
14
+
15
+ **播放来源**:歌曲所属的歌单、搜索、筛选结果或带有热门/最新顺序的歌手歌曲列表,用于返回列表和定位歌曲。
16
+
17
+ **播放会话**:某个平台账号保存的播放队列、播放位置和暂停状态,用户可以主动恢复。
18
+
19
+ **重播当前歌曲**:再次加载当前选择的歌曲,不执行之前失败的导航。
20
+
21
+ **重试**:再次执行未成功的操作,可能是导航到下一首,也可能是重新加载当前歌曲。
22
+
23
+ **歌手详情页**:某位歌手的信息及其歌曲列表,用户可从歌曲的歌手名称进入。
24
+
25
+ **歌手歌曲列表**:当前平台归属于指定歌手的歌曲集合,包含合唱歌曲;热门/最新顺序覆盖整个集合,而非仅当前页。
26
+
27
+ **喜欢状态**:当前平台账号是否将某首歌曲加入「我喜欢」。它不等同于歌曲是否存在于其他歌单中。