I’m a big fan of iTunes, and am growing to love Apple Music. Two things I love about Apple Music is that I can follow my interest in popular music from around the world and can research different musicals to inform the one I’m writing (not to steal, but to learn what works for me and what doesn’t).
Recently, iTunes added the ability to not just flag songs you love but also flag those you dislike. But it didn’t provide a way to skip disliked songs. That bugged me.
Warning: Technospeak ahead.
I’m a long-time Mac person. And I knew macOS had a cool tool called AppleScript to automate tasks.
After some fiddling around with some help from tutorials Using Script Editor from Doug’s AppleScripts for iTunes and idle thoughts from MacScripter, I came up a script. All I have to do is launch both iTunes and this script and then dislike whichever songs I wish. The moment I dislike a song, it skips to the next un-disliked song nearly immediately. And if I play a playlist or album again, it skips the disliked song again. Yay!
The only glitch I’ve noticed – besides not being able to see at a glance which songs you’ve already loved or disliked – is that, if a disliked song starts at the very start of the track, I sometimes hear up to a second of the disliked song before it gets skipped, especially if I have two or more disliked songs in a row. A small price to pay.
I’ve tested in in Apple Music and Apple Radio for people who have Apple Music.
I don’t know what would happen if you use Apple Radio without an Apple Music subscription (not sure if you can still do that) and hit the hourly skip limit. I think you would get a continuous series of nags that you can’t skip the song. If that happens, quit Skip Disliked Songs. I don’t have a workaround.
And now the script:
global timeToWait on idle tell application "System Events" if (exists process "iTunes") then tell application "iTunes" try if player state is not stopped then tell current track try if disliked is true then next track end if return timeToWait on error return timeToWait end try end tell end if on error return timeToWait end try end tell end if end tell end idle on run set timeToWait to 0.5 end run
And for those not familiar with AppleScript, here are the (Mac-only) steps:
Do this once:
- In your applications folder, in the Utilities sub-folder, launch Script Editor.
- If you don’t see a little scroll icon – kind of looks like a fancy “s” – in the menu over to the right with all the other menu icons:
- In the menu, choose Script Editor > Preferences.
- In the General tab, check Show script menu in menu bar.
- In the General tab, check Show computer scripts.
- Click the close button.
- If you don’t get an “Untitled” window, choose File > New from the menu.
- Paste in the script above into the main editing area.
- Click the hammer icon to compile the script. If you get any errors, clear it out and try re-copying and re-pasting.
- In the File menu choose Export.
- Name the file Skip Disliked Songs.
- Navigate to your home folder.
- If you don’t see a Library folder, hold down the Option key to reveal it.
- Navigate to Library then Scripts.
- If you want to keep any future scripts you might add organized, create an Applications folder, then an iTunes folder inside that, and navigate down to it. But that’s up to you.
- In the File Format drop-down, choose Application.
- Then check Stay open after run handler. This application is meant to stay open and keep an ear on iTunes.
- Click Save
Once you’ve done that, do this each time you open iTunes:
- In the menu bar, over to the right, look for something that looks like an old-fashioned scroll of paper. That’s the Script menu.
- In the Script menu, choose Skip Disliked Songs.
- If you find that the tiny snippets of disliked song bother you, you can go back and change timeToWait to a smaller number, say 0.25. If you experience performance issues, change it to a larger number at the expense of a larger snippet.
You’re all set! Enjoy your music.
Fine print: This is free software. I disclaim all warrantees and liability for its use.