我正在寻找允许执行这些任务的 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/