applescript - Apple Music API - 搜索歌曲并创建播放列表 (MacOS)

标签 applescript itunes apple-music

我正在寻找允许执行这些任务的 API

  • 在 Apple Music 中搜索歌曲
  • 创建播放列表
  • 将歌曲添加到播放列表

提前致谢。

最佳答案

恐怕您要求做的事情目前不可能 因为从 iTunes 12.2 开始,我们只能搜索本地库,而不能搜索整个 Apple Music API

如果您的音乐库(本地或云端)中有您想要播放的歌曲,您可以像这样搜索并播放歌曲:

tell application "iTunes"
    set results to (every track whose name contains "Cumuli" and artist is "883")
    repeat with tune in results
        play tune
    end repeat
end tell

然后您可以将检索到的歌曲放入您想要的播放列表中,或创建一个新的播放列表。看看this post for an example .

关于applescript - Apple Music API - 搜索歌曲并创建播放列表 (MacOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38676187/

相关文章:

ios - 从我的 iOS 应用打开 Apple Music

macos - Applescript 播放轨道 Spotify

ios - iOS 应用程序名称中的 Unicode 字符?

ios - 苹果音乐 UIKit 转换 : which API(s) should I use to accomplish this?

Cocoa Scripting Bridge 将所有歌曲名称放入数组中

ios - 错误消息 : The Bundle ID you entered has already been used

ios - 如何在 iOS 之外创建 Apple Music 用户 token

terminal - 如何通过 AppleScript Terminal.app 复制屏幕上的当前文本?

objective-c - 在我的可编写脚本的应用程序中为 "make new"提供我自己的对象

variables - 从另一个脚本获取变量