Hi,
I would like to be able to make Eventghost execute (or not) an action depending on the status of Spotify, ie if it's playing or not.
The idea is to execute a slideshow if music is playing.
The trigger would be the idle event.
Could you help me out with that?
Thanks,
Sheugel
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Spotify: action depending on status
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify: action depending on status
Provided you have added my Spotify plugin to your configuration, you can use this simple script in a macro and add the idle event to it. You can just add your code for the slide show stuff.
Best regards, Walter
Best regards, Walter
Code: Select all
p = eg.plugins.MySpotify.GetStatus()
if p.find('Not playing anything')<>-1:
print 'do things when not playing'
#add your code here
#stop slide show
if p.find('Now playing')<>-1:
print 'do things when playing'
#add your code here
#run slide show
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify: action depending on status
Hi,
Thanks, it's working but not entirely as... the plugin seems to be broken in the last version of Spotify (0.9.1.53). The logger displays "Spotify running! Not playing anything..." even when Spotify is actually playing something.
I tested with another PC running a previous version of Spotify, the plugin works but after the automatic upgrade of Spotify to the last version, the plugin doesn't work properly as mentioned hereabove...
Any help appreciated.
Thanks, it's working but not entirely as... the plugin seems to be broken in the last version of Spotify (0.9.1.53). The logger displays "Spotify running! Not playing anything..." even when Spotify is actually playing something.
I tested with another PC running a previous version of Spotify, the plugin works but after the automatic upgrade of Spotify to the last version, the plugin doesn't work properly as mentioned hereabove...
Any help appreciated.
Re: Spotify: action depending on status
Ok,
It seems the Spotify main window name has changed. Got it working by changing
lines in pytify.py in Spotify plugin folder with
Thanks again,
Sheugel
It seems the Spotify main window name has changed. Got it working by changing
Code: Select all
def _parseWindowTitle(self):
trackinfo = win32gui.GetWindowText(self._hwnd).split(" - ")Code: Select all
def _parseWindowTitle(self):
trackinfo = win32gui.GetWindowText(self._hwnd).split("Spotify - ")Sheugel