Skip to content

Instantly share code, notes, and snippets.

@jonocole
Created March 27, 2012 15:44
Show Gist options
  • Save jonocole/2217249 to your computer and use it in GitHub Desktop.
Save jonocole/2217249 to your computer and use it in GitHub Desktop.
Silence spotify ads
-- This isn't pretty but it works.
tell application "Spotify"
set old_volume to sound volume
repeat
if player state is playing then set current_album to album of current track
if player state is playing and (current_album starts with "http://" or current_album starts with "https://" or current_album starts with "spotify:") then
set sound volume to 0
play
else
if sound volume is not 0 then
set old_volume to sound volume
else
set sound volume to old_volume
end if
end if
delay 0.5
end repeat
end tell
@jonocole
Copy link
Author

Run this from the applescript editor to silence spotify ads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment