Skip to content

saiarvindg/SilentSpotifyAdsScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilentSpotifyAdsScript

Mute Spotify ads

Workflow

  1. Use Spotify API to get currently playing song and store the remaining time
  2. Calculate the time for the next song to start
  3. If the current track is an ad - then continue to next steps. Else skip to step 8
  4. Set volume to 0 (with Spotify's Beta Web API) when current playing song is not a song (apparently a premium only feature 😔)
  5. Use AppleScript to get the application volume of Spotify and save it
  6. Use AppleScript to set the application volume of Spotify to 0
  7. Wait for the ad to finish
  8. Use AppleScript to set the application volume of Spotify to what it was
  9. Go to step 1

Special cases to handle:

  • if the user starts spotify muted - then STORED_VOL will start out as 0
  • how to set STORED_VOL when music first played
  • negative volume issue after ad plays

TODO (after basic workflow is done):

  • Handling special cases
  • Add logging so print statements are logged to file not stdout
  • Fix print/log statements, grammar/spelling,
  • Maybe improve code (add constants for equality checks, methods to handle parsing/formatting, fix package imports)

About

Mute Spotify ads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages