Relax pauses iTunes too

November 2018

A screenshot of Relax' actions preferences screen

Relax version 1.0.1 is out now. I’ve added support for pausing iTunes (and thus Apple Music) when you unplug or disconnect your headphones.

Update within the app, or get Relax today!

Introducing Relax

November 2018

A vector image showing an avatar unplugging AirPods

Relax automatically mutes your internal speakers and pauses music apps when you disconnect headphones.

You can get Relax today!

Mute automatically 🔇

Disconnecting your headphones or speakers from your Mac automatically selects the Internal Speakers. Any sound that was playing before is now shared with everyone around you.

Your Cyndi Lauper playlist? Yea, that’s no longer a secret.

Rely on Relax 🍹

It monitors your default audio output and takes action when it notices you switch back to your internal speakers. Whether it’s dead batteries, wired or wireless.

Screenshot of a desktop running Relax in the menu bar

Works with wireless and wired headphones 🎧

Even Apple’s AirPods are supported. If any output device gets disconnected Relax has got your back. Battery dies halfway through your Dubstep set? Relax makes sure your disco stays private.

Pause music apps 🎵

Besides muting the volume, Relax can pause playback for some apps.

  • Spotify
  • YouTube playing in Chrome* (experimental)

I’ll be adding more apps to the list every update.

*: Enable “Allow JavaScript from Apple Events” under ViewDeveloper in Chrome.

Screenshot of Relax' app actions settings

Free software 🌴

Relax is free to use. Consider using the Tip Jar in the app to support its development.

Get Relax for free.

A screensot of Relax' tip jar screen

Press 🌐

More information, screenshots and icons are available in the Press Kit. Get the Press Kit here.

Black Friday & Cyber Monday 2018

November 2018

You can pickup Denied for just $1 the next few days!

Make sure you’re all set for the Christmas season and only listen to the carols you want to hear. 🎄

Screenshot of Denied skipping explicit content

Denied update 1.5.3 out now

November 2018

A customer pointed out an issue with Denied and iTunes when playing songs from Apple Music playlists. If you skipped back a track in the Mini Player, the artwork would disappear.

This update resolves the issue and improves how Denied works together with Apple Music. Read on to learn what I changed in this latest release.

After some investigation I discovered that Apple Music only returns the artwork for offline tracks, or songs that you’ve added or saved. You don’t even have to store them offline, simply adding them to one of your collections enables retrieving the artwork through AppleScript. That sounds odd, and I was a little surprised at first. An explanation I found online states that iTunes uses two different types of tracks to represent an online and an offline track. It’s unfortunate that the online variant does not include the artwork. I’ll submit a bug report to Apple and ask them if this is by design, or if it can be resolved.

This means that Denied can’t display an image for some of the songs that you’re playing through Apple Music. To accomodate for this I’ve updated the ‘artwork not available’ placeholder image. It changes with the new accent colors in Mojave.

New 'artwork not available' placeholder image in Denied

You can get the update now on the App Store. 🚀

This post originally appeared on

Improved disliked song skipping for Denied

November 2018

Apple’s just approved the latest update for Denied. Version 1.5.2 fixes a bug that prevented Denied from retrieving the ‘disliked’ state of a track when it did not have artwork.

You can get the update on the Mac App Store. 🚀

Instead of just pushing the update and forgetting the bug ever existed, I thought it would be interesting to tell you what exactly went wrong and how I resolved the issue.


Denied follows a set pattern to shape your listening experience.

  1. Get notified of a song change.
  2. Retrieve the song’s properties.
  3. Check if these attributes match any rules.
  4. Skip the track if a match was found.

To fetch a song’s title, artist etc. from iTunes or Spotify, Denied relies on AppleScript. This scripting language allows anyone to hook into an application (if it supports it) and retrieve information from it. Try this quick example.

  1. Launch Script Editor (/Applications/Utilities/Script
  2. Create a new document.
  3. Copy-paste the lines below. (Make sure you copy the lines for the right player.)

     tell application "Spotify"
     	name of current track
     end tell
     tell application "iTunes"
     	name of current track
     end tell
  4. Play a song.
  5. Run the script.

You should see the name of the current track in the Description field of the Script Editor.

The bug

Besides the track title, Denied also fetches the artist, the album, the artwork and (for iTunes) whether a track is disliked. Here’s what that script looks like.

property trackName : ""
property trackArtist : ""
property trackAlbum : ""
property trackArtwork : ""
property isDisliked : false
if application "iTunes" is running then
	tell application "iTunes"
			set trackName to name of current track
			set trackArtist to artist of current track
			set trackAlbum to album of current track
			set trackArtwork to data of artwork 1 of current track
			set isDisliked to disliked of current track
		end try
	end tell
end if
return {trackName, trackArtist, trackAlbum, trackArtwork, isDisliked}

This all works perfectly fine when scanning a track that has every property setup properly. The track’s artwork isn’t that reliable, unfortunately. Sometimes tracks don’t have artwork at all, sometimes it takes a few moments before it’s retrieved from the internet. I assumed the field would just remain empty then. That’s not what happens, though.

If the song’s artwork does not contain an image, the script returns the default value for all the parameters after it (property isDisliked : false). You can see why this would prevent Denied from ever knowing if a song without artwork was actually disliked.

The fix

Instead of fetching the artwork in the same script as the other properties, I made a seperate method that handles everything artwork related. This is similar to how I implemented fetching artwork for Spotify.


This was a pretty easy fix and I’m happy Apple approved the update withing a few hours. I’ve added some songs without any artwork to my test suite, so this shouldn’t happen again. I hope you found this interesting. 🙂

This post originally appeared on