hifi-download
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMusicMaster
MusicMaster
Music discovery (Spotify, Last.fm) and Hi-Res audio downloads (Qobuz, TIDAL) through a unified CLI.
All commands use , which activates the venv and runs the corresponding Python script. Output is human-readable by default; use where supported for structured output.
bash ${SKILL_PATH}/run.sh <script> [args...]--json通过统一的CLI实现音乐发现(Spotify、Last.fm)和高分辨率音频下载(Qobuz、TIDAL)。
所有命令均使用 格式,该命令会激活虚拟环境(venv)并运行对应的Python脚本。默认输出为人类可读格式;在支持的场景下可使用 参数获取结构化输出。
bash ${SKILL_PATH}/run.sh <script> [args...]--jsonFirst-Time Setup
首次设置
Step 1: Check Dependencies
步骤1:检查依赖
bash
bash ${SKILL_PATH}/scripts/setup.sh checkOutput is key=value pairs. If , run install first.
VENV=missingbash
bash ${SKILL_PATH}/scripts/setup.sh check输出为键值对格式。如果显示,请先运行安装命令。
VENV=missingStep 2: Install
步骤2:安装
bash
bash ${SKILL_PATH}/scripts/setup.sh install [--with-qobuz] [--with-tidal]Creates , installs core dependencies (, , , ), and optionally installs download backends.
.venvspotipypylastrequestspython-dotenvbash
bash ${SKILL_PATH}/scripts/setup.sh install [--with-qobuz] [--with-tidal]创建虚拟环境,安装核心依赖(、、、),并可选择安装下载后端。
.venvspotipypylastrequestspython-dotenvStep 3: Configure Credentials
步骤3:配置凭证
IMPORTANT: Do NOT ask the user for credentials in chat. Instead:
- Create from template if not exists:
.envcp ${SKILL_PATH}/.env.example ${SKILL_PATH}/.env - Tell user to edit with their credentials
${SKILL_PATH}/.env - Wait for confirmation, then verify
Alternatively, use the config script:
bash
bash ${SKILL_PATH}/run.sh setup_config --lastfm-key=KEY [--spotify-id=ID --spotify-secret=SECRET] [--qobuz-email=EMAIL --qobuz-password=PASS]Where to get credentials:
- Spotify: https://developer.spotify.com/dashboard (free)
- Last.fm: https://www.last.fm/api/account/create (free)
- Qobuz: Requires Studio/Sublime subscription
- TIDAL: Run in venv for OAuth
tiddl auth login
重要提示:请勿在对话中向用户索要凭证。请按以下步骤操作:
- 如果文件不存在,从模板创建:
.envcp ${SKILL_PATH}/.env.example ${SKILL_PATH}/.env - 告知用户编辑文件,填入个人凭证
${SKILL_PATH}/.env - 等待用户确认后,进行验证
或者使用配置脚本:
bash
bash ${SKILL_PATH}/run.sh setup_config --lastfm-key=KEY [--spotify-id=ID --spotify-secret=SECRET] [--qobuz-email=EMAIL --qobuz-password=PASS]凭证获取渠道:
- Spotify:https://developer.spotify.com/dashboard(免费)
- Last.fm:https://www.last.fm/api/account/create(免费)
- Qobuz:需要Studio/Sublime订阅
- TIDAL:在虚拟环境中运行进行OAuth认证
tiddl auth login
Step 4: Verify
步骤4:验证
bash
bash ${SKILL_PATH}/run.sh statusShows which services are READY, DISABLED, or need setup. Only use services marked READY.
bash
bash ${SKILL_PATH}/run.sh status显示各服务的状态:READY(就绪)、DISABLED(已禁用) 或 需要设置。仅可使用标记为READY的服务。
Service Types
服务类型
| Type | Services | Purpose |
|---|---|---|
| Discovery | Spotify, Last.fm | Search, recommendations, similar artists |
| Downloads | Qobuz, TIDAL | High-quality audio (FLAC, Hi-Res) |
| 类型 | 服务平台 | 用途 |
|---|---|---|
| 音乐发现 | Spotify、Last.fm | 搜索、推荐、相似艺人查找 |
| 音频下载 | Qobuz、TIDAL | 高品质音频(FLAC、Hi-Res)下载 |
Discovery Commands
音乐发现命令
Last.fm — Similar Artists
Last.fm — 相似艺人
bash
bash ${SKILL_PATH}/run.sh lastfm_artists "Radiohead"Returns a list of similar artists with match scores.
bash
bash ${SKILL_PATH}/run.sh lastfm_artists "Radiohead"返回带有匹配分数的相似艺人列表。
Last.fm — Similar Tracks
Last.fm — 相似曲目
bash
bash ${SKILL_PATH}/run.sh lastfm_tracks "Karma Police" "Radiohead"Arguments: track name, then artist name.
bash
bash ${SKILL_PATH}/run.sh lastfm_tracks "Karma Police" "Radiohead"参数:曲目名称,然后是艺人名称。
Last.fm — Taste Profile
Last.fm — 品味档案
bash
bash ${SKILL_PATH}/run.sh lastfm_tasteReturns the user's top artists and tracks from listening history.
bash
bash ${SKILL_PATH}/run.sh lastfm_taste返回用户收听历史中的热门艺人和曲目。
Spotify — Search
Spotify — 搜索
bash
bash ${SKILL_PATH}/run.sh spotify_search "OK Computer"Searches Spotify catalog for tracks, albums, and artists.
bash
bash ${SKILL_PATH}/run.sh spotify_search "OK Computer"在Spotify曲库中搜索曲目、专辑和艺人。
Spotify — User Library
Spotify — 用户库
bash
bash ${SKILL_PATH}/run.sh spotify_user tracks|artistsGets the user's saved tracks or followed artists (requires OAuth).
bash
bash ${SKILL_PATH}/run.sh spotify_user tracks|artists获取用户收藏的曲目或关注的艺人(需要OAuth认证)。
Spotify — Track/Album Info
Spotify — 曲目/专辑信息
bash
bash ${SKILL_PATH}/run.sh spotify_info SPOTIFY_URI_OR_IDbash
bash ${SKILL_PATH}/run.sh spotify_info SPOTIFY_URI_OR_IDDownload Commands
音频下载命令
Search Platform Catalog
搜索平台曲库
bash
bash ${SKILL_PATH}/run.sh platform_search "Album Name" -p qobuz|tidalSearches the download platform's catalog. Returns IDs for use with download command.
bash
bash ${SKILL_PATH}/run.sh platform_search "Album Name" -p qobuz|tidal在下载平台的曲库中搜索,返回可用于下载命令的ID。
Download (async — returns immediately)
下载(异步 — 立即返回)
bash
bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz|tidal -t album|trackQueues the download in a background process and returns a immediately. The agent is free to continue other work. Use to poll progress.
download_iddownload_statusTo block until the download completes (legacy behavior):
bash
bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz -t album --syncbash
bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz|tidal -t album|track将下载任务加入后台进程队列,并立即返回。Agent可继续执行其他任务。使用命令查询进度。
download_iddownload_status如需等待下载完成后再返回(旧版行为):
bash
bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz -t album --syncCheck Download Status
检查下载状态
bash
bash ${SKILL_PATH}/run.sh download_status DOWNLOAD_ID
bash ${SKILL_PATH}/run.sh download_status --all
bash ${SKILL_PATH}/run.sh download_status --active
bash ${SKILL_PATH}/run.sh download_status --jsonPoll the status of a specific download or list all downloads. Use to show only pending/in_progress tasks. Use for structured output.
--active--jsonbash
bash ${SKILL_PATH}/run.sh download_status DOWNLOAD_ID
bash ${SKILL_PATH}/run.sh download_status --all
bash ${SKILL_PATH}/run.sh download_status --active
bash ${SKILL_PATH}/run.sh download_status --json查询特定下载任务的状态,或列出所有下载任务。使用参数仅显示待处理/进行中的任务。使用参数获取结构化输出。
--active--jsonOpen Download Dashboard
打开下载仪表盘
bash
bash ${SKILL_PATH}/run.sh download_uiOpens a web dashboard at showing real-time download status with progress bars. Auto-refreshes every 3 seconds.
http://localhost:8765bash
bash ${SKILL_PATH}/run.sh download_ui在打开网页仪表盘,实时显示下载状态和进度条,每3秒自动刷新。
http://localhost:8765Service Management
服务管理
Disable a Service
禁用服务
bash
bash ${SKILL_PATH}/run.sh disable_service spotify --reason "No account"bash
bash ${SKILL_PATH}/run.sh disable_service spotify --reason "No account"Enable a Service
启用服务
bash
bash ${SKILL_PATH}/run.sh enable_service spotifybash
bash ${SKILL_PATH}/run.sh enable_service spotifyWorkflow — Music Discovery
工作流 — 音乐发现
- Run to check available services
status - Use or
lastfm_artiststo find similar musiclastfm_tracks - Use to look up specific tracks/albums
spotify_search - Present results to user in a clear table format
- If user wants to download, use →
platform_searchplatform_download
- 运行命令检查可用服务
status - 使用或
lastfm_artists查找相似音乐lastfm_tracks - 使用查找特定曲目/专辑
spotify_search - 以清晰的表格格式向用户展示结果
- 如果用户想要下载,执行→
platform_search流程platform_download
Workflow — Download Hi-Res Audio
工作流 — 下载高分辨率音频
- Run to confirm download service is READY
status - Search:
platform_search "Album Name" -p qobuz - Present results with quality info
- Download: (returns download_id immediately)
platform_download ID -p qobuz -t album - Tell user download is queued, optionally open for visual monitoring
download_ui - Poll with until completed
download_status DOWNLOAD_ID - Report download path and file size to user
- 运行命令确认下载服务处于READY状态
status - 搜索:
platform_search "Album Name" -p qobuz - 展示包含音质信息的搜索结果
- 下载:(立即返回download_id)
platform_download ID -p qobuz -t album - 告知用户下载任务已加入队列,可选择打开进行可视化监控
download_ui - 使用轮询直至下载完成
download_status DOWNLOAD_ID - 向用户报告下载路径和文件大小
Error Handling
错误处理
| Error | Detection | Resolution |
|---|---|---|
| Venv missing | | Run |
| Service not configured | | Guide user to edit |
| Spotify OAuth expired | Spotify commands fail with auth error | Run |
| TIDAL token expired | | Run |
| Service disabled by user | | Run |
| No results | Search returns empty | Try different keywords or check service availability |
| 错误类型 | 检测方式 | 解决方法 |
|---|---|---|
| 虚拟环境缺失 | | 运行 |
| 服务未配置 | | 引导用户编辑 |
| Spotify OAuth过期 | Spotify命令执行时返回认证错误 | 运行 |
| TIDAL令牌过期 | | 在虚拟环境中运行 |
| 用户禁用服务 | | 如果用户需要重新启用,运行 |
| 无搜索结果 | 搜索返回空结果 | 尝试不同关键词或检查服务可用性 |
Important Notes
重要说明
- Spotify requires OAuth browser flow on first use (script handles this)
spotify_auth - TIDAL auth is managed by CLI tool, not stored in
tiddl.env - Qobuz credentials are stored in (sensitive — ensure file is in
.env).gitignore - Download paths default to and
~/Music/Qobuz~/Music/TIDAL - Quality settings: Qobuz 27=Hi-Res 24-bit (highest), TIDAL HiFi=lossless
- Spotify首次使用时需要通过OAuth浏览器流程授权(脚本会处理此流程)
spotify_auth - TIDAL的认证由CLI工具管理,不存储在
tiddl文件中.env - Qobuz凭证存储在文件中(敏感信息 — 确保该文件已加入
.env).gitignore - 默认下载路径为和
~/Music/Qobuz~/Music/TIDAL - 音质设置:Qobuz 27=24位高分辨率(最高音质),TIDAL HiFi=无损音质