Mopidy get current session connection status

Hi, is there a way to get the session.connection status from .backend?

need to get the session.connection.status from mopidy_spotify -> SpotifyBackend and do something if logged in, logged out, etc. hope someone will understand my explanation. Thanks in advance.

p.s will send a mpd command to mopidy and if mopidy is not running, run mopidy. and I need a signal that mopidy is now ready to receive mpd commands after the ‘logged in to Spotify in online mode’

Would something like this do it, Tip: Play from playlist at startup instead of a playlist just make it a prerecord mp3 of you saying “ready now”

1 Like

Thank you for your reply! But I need to get the current session of mopidy. If mopidy is successfully logged in to spotify then I will do something.

,
the one that is sent to the log file.

Mopidy is a daemon designed to always be running so this use case isn’t supported. You could hack it up to wait for that log message to appear In the log file. Or use some other piece of software designed for what you are trying to do.

1 Like

oh, thank you for your reply.