Media Orchestrator
This skill centralizes the logic for handling all media requests (audio, video, Spotify tracks) from chat platforms like WhatsApp and Telegram. It leverages yt-dlp for robust search and download capabilities from YouTube and performs Spotify metadata resolution for WebUI integration.
⚙️ How it Works
- 1. Resolution: Upon receiving a media request, the orchestrator uses
yt-dlp's ytsearch1: functionality to find the highest quality match from YouTube. - Download: The selected media (audio or video) is downloaded directly into the OpenClaw workspace.
- Delivery: The downloaded file is then dispatched to the requesting chat platform (WhatsApp/Telegram) using the
message tool's filePath argument, ensuring silent delivery as per protocol. - Spotify Sync: For Spotify-specific requests, the orchestrator resolves track metadata via Zero-Auth scraping (bypassing direct API holds) and persists this data as a JSON contract in the workspace, enabling synchronized playback in the OpenClaw WebUI.
📂 Workspace Paths
- - Primary Workspace: INLINECODE5
- Raw downloaded media files (.mp4, .mp3, etc.) reside here temporarily.
- - Spotify Metadata: INLINECODE6
- Stores Spotify track contracts (e.g.,
track_id.json) generated by the
spotify-surface component.
- - Skill Scripts: INLINECODE9
- Contains the dedicated logic engine for Spotify integration.
🛠️ Commands
This skill acts as an underlying orchestrator, processing natural language requests.
Example intents it handles:
- - INLINECODE10
- INLINECODE11
- INLINECODE12 (leveraging spotify-surface)
Media Orchestrator
该技能集中处理来自 WhatsApp 和 Telegram 等聊天平台的所有媒体请求(音频、视频、Spotify 曲目)的逻辑。它利用 yt-dlp 实现强大的 YouTube 搜索和下载功能,并执行 Spotify 元数据解析以支持 WebUI 集成。
⚙️ 工作原理
- 1. 解析:收到媒体请求后,编排器使用 yt-dlp 的 ytsearch1: 功能从 YouTube 查找最高质量的匹配项。
- 下载:选定的媒体(音频或视频)直接下载到 OpenClaw 工作区中。
- 投递:下载的文件随后通过 message 工具的 filePath 参数发送到请求的聊天平台(WhatsApp/Telegram),确保按照协议静默投递。
- Spotify 同步:对于特定的 Spotify 请求,编排器通过零认证抓取(绕过直接 API 限制)解析曲目元数据,并将此数据作为 JSON 契约持久化存储在工作区中,从而在 OpenClaw WebUI 中实现同步播放。
📂 工作区路径
- - 主工作区:/home/ky11rie/.openclaw/workspace/
- 原始下载的媒体文件(.mp4、.mp3 等)临时存储在此处。
- - Spotify 元数据:/home/ky11rie/.openclaw/workspace/media/spotify/
- 存储由 spotify-surface 组件生成的 Spotify 曲目契约(例如 track_id.json)。
- - 技能脚本:/home/ky11rie/.openclaw/workspace/skills/spotify-surface/scripts/
- 包含用于 Spotify 集成的专用逻辑引擎。
🛠️ 命令
该技能作为底层编排器,处理自然语言请求。
它处理的示例意图包括:
- - 发送音频文件 歌曲:[歌曲名称]
- 发送视频文件 mp4 480p:[视频名称]
- 播放 [Spotify 曲目或链接](利用 spotify-surface)