Closed webmasterMeyers closed 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
See PR #111
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?