tried with btt and spoke to the dev, he tried to help but something in btt doesn't work without bringing up an annoying flicker of the app to foreground because spotify changed something only for repeat and shuff, so I figure maybe km could do it. I'll play with the action thanks.
seemed to work but also flickers as it brings up spotify briefly when outside the spotify app, wish it would work in background somehow, but flicker is less obstrusive via km than btt at least.
Hi Zabobon, I was given the same advice on btt forum, that solves the shuffling toggle, but strangely it seems spotify went from off, on, one for repeat to true or false, so it toggles repeat on or off.
I'm often distracted doing other things and like to have my songs on repeat one, or repeat the track until I switch tracks or stop, this seems to not be in the applescript dictionary anymore, and spotify stupidly takes off repeat one to track repeat when you change tracks
So it seems bringing it to the foreground might be the only way, outside python coding and spotipy which I don't understand.
so I might have to get used to a millisecond flicker when it brings it up
You can use the Spotify API to cycle through the three repeat modes in the desktop app on Mac. The Spotify API provides an endpoint for setting the repeat mode of the player. You can use a PUT request to the /v1/me/player/repeat endpoint with an OAuth token authorized with the user-modify-playback-state scope. The state parameter in the request body can be set to track, context, or off to cycle through the repeat modes.
Here is an example of a curl command that sets the repeat mode to context:
You can use this command in a script or program to cycle through the repeat modes.
To get access to the Spotify API, you need to follow these steps:
Create a Spotify account: If you don’t already have one, create a Spotify user account (Premium or Free) by signing up at www.spotify.com.
Log into the Spotify Developer Dashboard: Go to the Dashboard page at the Spotify Developer website and log in using your Spotify account.
Create an app: Once you have logged into the dashboard, create an app. This will give you access to the app credentials, which are required for API authorization to obtain an access token.
Obtain an access token: Use the app credentials to obtain an access token. This token is used in your API requests to authenticate and authorize your app.
Once you have completed these steps, you can use the curl command I provided earlier to set the repeat mode of the player using the Spotify API.
You will need to replace {your access token} in the command with your actual access token.
thanks, I had somebody make some complex scripts for me before in python, I do have an app and got an access token and put it in your script and it said 403 error premium required, but I have premium so I think this pretty much above my head, but maybe one day I'll figure it out.