使用 AppleScript 控制 Spotify

发布于 2024-12-27 15:52:50 字数 144 浏览 6 评论 0原文

本质上我想做的是通过 AppleScript 播放整个专辑。现在,您可以使用他们的特殊 URI 来加载专辑,但不能播放它。您还可以播放特定曲目,但播放完毕后,您的队列将恢复之前播放的内容。

Spotify 的脚本词典有点薄,有人知道是否有计划增加其深度吗?

Essentially what I'd like to do is play an entire album via AppleScript. Right now, you can use their special URIs to load the album, but not play it. You can also play a specific track, but once that finishes playing, your queue resumes what was playing before.

Spotify's scripting dictionary is somewhat thin, does anyone know if there are plans to increase its depth a bit?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

始终不够 2025-01-03 15:52:50

Spotify 的最新版本已将其添加到词典中。例如:

tell application "Spotify"
    play track "spotify:album:7ppypgQppMf3mkRbZxYIFM"
end tell

More recent versions of Spotify have added this to the dictionary. For example:

tell application "Spotify"
    play track "spotify:album:7ppypgQppMf3mkRbZxYIFM"
end tell
悲念泪 2025-01-03 15:52:50

如果您想播放/暂停最近播放的内容,可以使用以下脚本。如果将它们中的每一个保存为 Automator 应用程序,则可以从 Spotlight 或 Alfred 运行它们。

播放:

tell application "Spotify"
    play
end tell

暂停:

tell application "Spotify"
    pause
end tell

If you want to play/pause whatever was most recently playing you can use the following scripts. If you save each of them as Automator applications and you can run them from Spotlight or Alfred.

Play:

tell application "Spotify"
    play
end tell

Pause:

tell application "Spotify"
    pause
end tell
围归者 2025-01-03 15:52:50

当前的字典还没有办法做到这一点。我们希望在未来扩展它,但我目前不知道有任何具体计划。

There's currently no way to do this with the current dictionary. We'd like to expand it in the future, but I'm not aware of any concrete plans to do so at the moment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文