1

So I'm working on a project to convert Spotify to Apple Music playlists and I'm utilizing AppleScript to do so. I was wondering if anyone knows how to search all of Apple Music when utilizing the search function.

set myList to {"Bound2", "Malfunction"}


activate application "Music"
tell application "Music"
    make new user playlist with properties {name:"Conversion"}
end tell


tell application "Music"
    repeat with theItem in myList
        set theSearch to (search for theItem)
        add theSearch to playlist "Conversion"
    end repeat
    
end tell

This sets up a list of music, creates a blank playlist, then iterates through the list adding each song theItem to the blank playlist.

The issue is the search function needs a parameter for a place to search through. For example, it needs Library to search through the users library. I cannot find a parameter to search through all of Apple Music though. Any ideas?

1 Answer 1

1

I like this shortcut since it works on iOS and macOS and you can inspect the API usage before importing it.

It has a note on who made it and a tutorial on YouTube. I’m not good enough with AppleScript to translate it, though.

enter image description here

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .