Spotify Control (macOS)
Overview
Control Spotify on macOS using AppleScript. This skill provides a set of commands to manage playback, volume, and track information.
Actions
Playback Control
- - Play/Pause: Toggle playback.
- Next/Previous: Jump to next or previous track.
- Stop: Pause playback.
Volume & Position
- - Set Volume (0-100): Adjust Spotify internal volume.
- Set Position (seconds): Jump to a specific time in the current track.
Metadata & State
- - Get Info: Retrieve current track name, artist, album, and Spotify URL.
- Set Shuffle (on/off): Toggle shuffle mode.
- Set Repeat (on/off): Toggle repeat mode.
Usage
Agents should use the scripts/spotify-control.py wrapper for all commands.
Examples
CODEBLOCK0
Guardrails
- - Ensure Spotify is installed and running.
- All commands are one-shot AppleScript executions via a Python wrapper.
- Does not affect system-wide volume unless specified for fallback.
Spotify 控制 (macOS)
概述
使用 AppleScript 控制 macOS 上的 Spotify。该技能提供了一组命令,用于管理播放、音量和曲目信息。
操作
播放控制
- - 播放/暂停:切换播放状态。
- 下一首/上一首:跳转到下一首或上一首曲目。
- 停止:暂停播放。
音量与位置
- - 设置音量 (0-100):调整 Spotify 内部音量。
- 设置位置 (秒):跳转到当前曲目的指定时间点。
元数据与状态
- - 获取信息:检索当前曲目名称、艺术家、专辑和 Spotify 链接。
- 设置随机播放 (开/关):切换随机播放模式。
- 设置循环播放 (开/关):切换循环播放模式。
使用方法
代理应使用 scripts/spotify-control.py 封装器执行所有命令。
示例
sh
切换播放/暂停
scripts/spotify-control.py playpause
获取当前曲目信息
scripts/spotify-control.py get-info
将音量设置为 80%
scripts/spotify-control.py set-volume 80
跳转到 1 分钟 (60秒)
scripts/spotify-control.py set-position 60
安全限制
- - 确保 Spotify 已安装并正在运行。
- 所有命令均通过 Python 封装器执行一次性 AppleScript。
- 除非指定为备用方案,否则不会影响系统音量。