In my project, I have a bunch of music tracks in a directory of my computer.
I want to add them to my iTunes library in an automated way. I also want to group them in playlists depending on the folder they were in, so just moving them in the Library folder won't do it for me.
Also, I can't use the AppleMusic API (I don't really want to buy an Apple developer licence for a small personal project.)
I thought about a bunch of possible ways to do that, but I'm not aware enough to know what could work/would be less tricky to implement :
use a Swift script using iTunesLibrary module
modify iTunes database to create playlists and link songs
use Automator, AppleScript or other software
I don't know how to code with Swift, manipulate iTunes' database or what Automator can be used for. Anyone with experience that could guide me would be greatly thanked.
Edit: some more precisions