SecUpwN / Spotify-AdKiller

Your Party with Spotify - without ads!
https://github.com/SecUpwN/Spotify-AdKiller
GNU General Public License v3.0
839 stars 83 forks source link

how about quit and relaunch #109

Closed webmasterMeyers closed 5 years ago

webmasterMeyers commented 5 years ago

I currently just quit spotify as soon as an ad starts and re-open it. It takes less then 5 seconds and I only hear a second of the ad. Better then waiting up to a minute for an ad to finish.

would it be possible for this script to, upon "hearing" the ad, close spotify, launch spotify, and press play?

webmasterMeyers commented 5 years ago

manually, on Ubuntu 18.10 I have aliased the following command,so in terminal I can run spot and it will close, reopen, minimise, and start play of spotify. less then 4 seconds. This could be made way better in a bash script I am sure, but here is the idea.

(kill $(pgrep spotify) 1>/dev/null 2>&1) || echo "spotify not already open"; (spotify --minimized 1>/dev/null 2>&1 & disown) && sleep 1 && xdotool windowminimize $(xdotool getactivewindow) && sleep 2 && qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
webmasterMeyers commented 5 years ago

See PR #111