csaborio Posted July 6, 2016 Posted July 6, 2016 (edited) I was ecstatic when I found a workflow to add the currently playing track any playlist of my choice. So fast and efficient! But, alas, the workflows out there do not seem to work with Apple Music. I have looked at AppleScript API for iTunes (god I hate AS) and the small proof of concepts I have made have failed miserably. Has anybody gotten close to doing this? I am so sick of adding songs to playlists like a mere mortal! Thanks! -Christian Edited July 6, 2016 by Vítor Fixed typo in title
dfay Posted July 6, 2016 Posted July 6, 2016 nah I don't think it's possible - if Doug Adams doesn't have a script for it, you can pretty much assume it can't be done yet. In Sierra maybe. csaborio 1
csaborio Posted July 6, 2016 Author Posted July 6, 2016 Thanks for the reply...I guess we'll just have to wait and see.
Jasondm007 Posted July 22, 2020 Posted July 22, 2020 @csaborio & @dfay Out of curiosity, do you guys know if this issue has improved since your last post (re: Add Apple Music track to playlists and/or user library, etc.)? I'd like to be able to: Add the current track playing from Apple Music to my user library (so that it's now in my library, or so that I can later add it to playlist, etc.), and Add the current track playing from Apple Music directly to a playlist without first adding it to my user library As for the first issue, I've had a little luck using the following line to get the track into my library: duplicate current track to source "Library" However, it's incredibly slow and buggy. So, if you're lucky, and it actually works, then you still have to put a ton of delays in the script to give it time to add it to your library (so that you can later search for it and add it a playlist, etc.). For example, the following AppleScript uses this method and tries to add the track to a predefined playlist called Inbox 📥: tell application "Music" set thePlaylist to user playlist "Inbox 📥" set trackName to name of current track set artistName to artist of current track try duplicate current track to source "Library" delay 8 set foundTracks to (every track of library playlist 1 whose artist is artistName and name is trackName) repeat with theTrack in foundTracks duplicate theTrack to thePlaylist end repeat set theNotification to ("Added ✅ " & artistName & ", " & trackName) on error set theNotification to ("Failed ❌ " & artistName & ", " & trackName) end try return theNotification end tell However, the script doesn't work very well (even after tinkering around with the delays). And, as for the second item, I haven't made any progress with it (i.e., short of using a hokey way of accessing the right-click/context menu to add it to a playlist). But this almost never works. Any ideas? Thanks for your help!!
csaborio Posted July 22, 2020 Author Posted July 22, 2020 Hey! Unfortunately, I've given up on this. I just switch to iTunes and add the song directly to the playlist. I used to love to this via Alfred, but the hours I've spent trying to automate everything are simply not worth my time or anger. Apple needs to kill Applescript. Jasondm007 1
vitor Posted July 23, 2020 Posted July 23, 2020 11 hours ago, csaborio said: Apple needs to kill Applescript. No, what they should to do is invest in it and make it better. But they won’t. Don’t worry, they’ll kill it soon enough when they bring Shortcuts to the Mac. And we’ll be lucky if they don’t make us pay them 100$/year for a developer account to share our automations.
gedeyenite Posted January 12, 2022 Posted January 12, 2022 On 7/23/2020 at 5:32 AM, vitor said: Don’t worry, they’ll kill it soon enough when they bring Shortcuts to the Mac. And we’ll be lucky if they don’t make us pay them 100$/year for a developer account to share our automations. One can always switch to Android.
vitor Posted January 12, 2022 Posted January 12, 2022 1 hour ago, gedeyenite said: One can always switch to Android. Welcome to the forum. Switching to Android wouldn’t do anything because I was talking about macOS, not iOS. But even if I were talking about iOS, switching to Android would still not do anything because as far as I’m aware it doesn’t have ubiquitous automations capabilities and no AppleScript. So essentially in response to “I’m unhappy about this thing in this platform” your suggestion was “switch to another platform which also doesn’t have the thing you want”. I don’t want to switch to Android. I don’t like it. I don’t like everything about iOS either, but as a whole it fits my needs considerably better. But I don’t have any interest in flamewars; everyone should use what they prefer. More importantly, though, I was wrong. Apple did not kill AppleScript when they introduced Shortcuts. They haven’t extended it either, but Shortcuts has direct support for AppleScript which proves they at least acknowledge it. And they do not require a developer account to share automations and there’s no indication they will. Saez and csaborio 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now