Awesome and thank you for this work !
I was looking for this kind of bridge because I have an AppleScript to get all my iTunes Playlist in a tree and I'd like to show it in a source list in a Swift OSX app.
But my script return a long list which contains all my playlist like for 20 (but I have more 500) :
{{theName:"Bibliothèque", theID:"66270731FDBE2C50", isFolder:false, theClass:library playlist, isSmart:false, theCount:37581}, {theName:"Clips vidéo", theID:"07D5032B96891D67", isFolder:false, theClass:user playlist, isSmart:true, theCount:283}, {theName:"Musique", theID:"CBDD9214A5BD0B6F", isFolder:false, theClass:user playlist, isSmart:true, theCount:35901}, {theName:"Films", theID:"CBDD9214A5BD0B70", isFolder:false, theClass:user playlist, isSmart:true, theCount:136}, {theName:"Vidéos personnelles", theID:"4B4E7FC3F07E6F4E", isFolder:false, theClass:user playlist, isSmart:true, theCount:48}, {theName:"Séries TV", theID:"CBDD9214A5BD0B71", isFolder:false, theClass:user playlist, isSmart:true, theCount:819}, {theName:"Podcasts", theID:"BCF56C8DABE66010", isFolder:false, theClass:user playlist, isSmart:false, theCount:1264}, {theName:"Livres audio", theID:"CBDD9214A5BD0B72", isFolder:false, theClass:user playlist, isSmart:true, theCount:0}, {theName:"Acheté sur NailleucoPhone", theID:"E91BEB5B6EF9BCC2", isFolder:false, theClass:user playlist, isSmart:false, theCount:1}, {theName:"=ALL MUSIC=", theID:"95D86D03EC2861F0", isFolder:true, theClass:folder playlist, isSmart:false, theCount:7880, theChildren:{{theName:"Smart", theID:"260C92610890EF91", isFolder:true, theClass:folder playlist, isSmart:false, theCount:7880, theChildren:{{theName:"--All Music ++--", theID:"973CB171739FAB9D", isFolder:false, theClass:user playlist, isSmart:true, theCount:2938}, {theName:"--Hard & Metal + Rock & Folk--", theID:"3D99CE986F699F13", isFolder:false, theClass:user playlist, isSmart:true, theCount:2371}, {theName:"--Hard & Metal ++--", theID:"49296220B7164B67", isFolder:false, theClass:user playlist, isSmart:true, theCount:1336}, {theName:"--Rap & Dance ++--", theID:"ECB5F697EB6FF887", isFolder:false, theClass:user playlist, isSmart:true, theCount:603}, {theName:"--Rock & Folk ++--", theID:"05E45490A8F8F012", isFolder:false, theClass:user playlist, isSmart:true, theCount:1064}, {theName:"All Music", theID:"95D86D03EC2861EF", isFolder:false, theClass:user playlist, isSmart:true, theCount:4008}, {theName:"Bientôt dans All Music", theID:"31E4095A87322236", isFolder:false, theClass:user playlist, isSmart:true, theCount:3871}, {theName:"No All Music", theID:"76EBD18939CC3778", isFolder:false, theClass:user playlist, isSmart:false, theCount:1}}}, {theName:"--Fun & Délire--", theID:"932E6066C9E582D7", isFolder:false, theClass:user playlist, isSmart:false, theCount:77}}}}
And as soon as the return is not a record (like in your example to get the current track infos) but a list, the return fails (nothing in the console).
Any idea ?
Thx a lot.