a windows C# script that mutes Spotify when an ad's playing
NOTE: This software is for educational purposes only. DO NOT use it in any way against Spotify terms and conditions of use.
you'll need a ClientID and ClientSecret for it to run. when you run for the first time it it'll ask you to enter them in the browser, then will ask you to authorize the app in your spotify account.
you can pass the ClientID and ClientSecret as paramaters to avoid entering them in the browser
cmd/shell command:
SpotifyMuteAds.exe <ClientID> <ClientSecret>
you can use _RUN.bat
file, but you need to edit it first
- right-click on it and press 'Edit'
- now replace the <ClientID> and <ClientSecret> with your ClientID and ClientSecret and save the file
- now you can use
_RUN.bat
to run the script
After running for the first time, a browser tab will open
- If you didn't pass the clientID and clientSecret it'll ask you to enter them now. if you did, then you can skip this step
- Then it's goning to ask you to authourize the app with your spotify account, do it and wait for the message ("OK - This window can be closed now")
Great! we're done.
The console will display the current state as:
- Playing: <current song>: the currently playing song
- Paused: when the user isn't playing anything
- Muted: when an ad is running and it's muted
- CSCore to control the volume
- SpotifyAPI-NET for API calls