Created
March 27, 2012 15:44
-
-
Save jonocole/2217249 to your computer and use it in GitHub Desktop.
Silence spotify ads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run this from the applescript editor to silence spotify ads.