hnarayanan/shpotify

Toggle Private Session

marclundgren opened this issue · 6 comments

hi @hnarayanan,

Could the tool potentially support toggling the Private Session?

screen shot 2018-06-11 at 11 52 35 am

It’s possible but I don’t know for sure. If you can find an AppleScript event that corresponds to this, e.g. “tell application to ‘turn on private mode’”, then it’s easy to add to the script.

I just opened an issue for spotify to support this via web API

spotify/web-api#913

osascript -e 'tell application "Spotify" to session as string'

@hnarayanan how can I find a list of variables that osascript can access on an application? any guides or references would be helpful.

resources I've tried:
https://ss64.com/osx/osascript.html
http://osxdaily.com/2016/08/19/run-applescript-command-line-macos-osascript/
https://developer.apple.com/library/archive/documentation/Darwin/Reference/ManPages/man1/osascript.1.html

@marclundgren You should be able to see which variables can be passed in the sdef file. Depends where Spotify is installed, but mine is located in /Applications/Spotify.app/Contents/Resources/Spotify.sdef

looks like there's no access to the private session in Spotify.sdef :(

Thank you for doing the research though, and thanks @dmofot. Unfortunately this issue needs to be closed. Please reopen this is the situation changes with how we can control Spotify.