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.

Spotify (api is partially broken)

Questions and comments specific to a particular plugin should go here.
Post Reply
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Spotify (api is partially broken)

Post by krambriw »

Hi,

Plugin for Spotify

The python api (pytify) is partially broken with the newest version of Spotify and therefore only some functions are still working. I have no solution for the moment.

Best regards, Walter

Current & older version always here:
http://sto.hopto.org/index.html
Last edited by krambriw on Tue Mar 24, 2015 11:14 am, edited 10 times in total.
brotbuexe
Posts: 19
Joined: Wed Feb 21, 2007 8:40 pm

Re: Plugin for Spotify

Post by brotbuexe »

nice, thanks.
brotbuexe
Posts: 19
Joined: Wed Feb 21, 2007 8:40 pm

Re: Plugin for Spotify

Post by brotbuexe »

Sometimes the plugin says spotify is running but not playing anything but thats wrong.
At this time next and previous track also did not function.

Any suggestions? How can I trace/debug this?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

My plugin fully relies on the functions provided by the file pytify.py

I think I know what the problem comes from. We are losing the handle to the Spotify window, most likely because you have restarted Spotify but not EventGhost afterwards.

I think we (read I) need to see if I can add some control that always checks for the Spotify window before sending any messages to it

Best regards, Walter
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

I have a working version that eliminates the problems discussed

Will upload later tonight, some small fixes left to clean up
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

The new version, added a thread to monitor Spotify status
__init__.py
(6.61 KiB) Downloaded 575 times
brotbuexe
Posts: 19
Joined: Wed Feb 21, 2007 8:40 pm

Re: Plugin for Spotify

Post by brotbuexe »

thanks.

I needed the the playing information so I added a getstatus with copy and paste.
Attachments
__init__.py
(7.04 KiB) Downloaded 547 times
brotbuexe
Posts: 19
Joined: Wed Feb 21, 2007 8:40 pm

Re: Plugin for Spotify

Post by brotbuexe »

today it didn't worked anymore,

I put my pc in standby every day/night, so no reboot.

The plugin sayd Spotify is running but doesn't play anything.

No play/pause, no next/back.

After spotify restart the same.

After eventghost restart it worked again.

Anything I can do to trace the problem next time?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

As with all software, most of the code is for error handling and exceptions....

Here is a new version I have tried as much as possible, seems to handle all situations I can imagine

If you look in the code you could enable a print statement that will help if you run into some problems. Otherwise I think the best is to add print statements here and there to print out variable values during design & debugging

Lets hit it and see if you find some more errors :wink:

Best regards, Walter

__init__.py
(8.77 KiB) Downloaded 590 times
brotbuexe
Posts: 19
Joined: Wed Feb 21, 2007 8:40 pm

Re: Plugin for Spotify

Post by brotbuexe »

thanks, I try it.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

This reply was deleted by purpose
Krazz
Posts: 9
Joined: Fri Nov 27, 2009 11:36 pm

Re: Plugin for Spotify

Post by Krazz »

Thank you for a great plugin.
harahauk
Posts: 1
Joined: Fri Dec 04, 2009 2:28 pm

Re: Plugin for Spotify

Post by harahauk »

Thanks for the plugin! It worked all yesterday, but now it suddenly stopped working again. Very wierd :/

Edit: Using lates posted version of spotify script and EG 0.3.7.r1194 with win7

Edit2: Err.. after a reboot or so it works again :P

Thanks man, this is awesome
Jostein
Experienced User
Posts: 108
Joined: Sun Feb 15, 2009 12:59 pm

Re: Plugin for Spotify

Post by Jostein »

Hi krambriw.

I have been a long time user of spotify, so when i found that you created a plugin for it i desided to use it instead of emulating keystrokes.

I think i have found some sort of bug.

I desided to disable it when the activety spotify isent activated due to the log messages "Spotify Window was not found". As i close down spotify completly when doing other things. The problem is if load the EG config file whit the plugin disabled i get a fault if i try to create a new config file or try to open an exsiting one.
Error.JPG

Also any plans of making a shutdown comand for spotify. (I like to close it down completly if i start an other activity like for example Power dvd. becouse of the fact: if i play a song with spotify and start power dvd i have to make a play/pause to spotify first, this is weary unstable due to the fact that i might not be playing a song at the moment and then the song starts when power dvd opens.) A other option would be to make two new comands stop and play to the plugin seperate. This i think could be acheved with monitoring the "Get current Status" before executing play and stop becouse every time it is stoped it shows: Spotify running! Not playing anything...

None of these points are urgent and i dont need any of theme as i have built my own sulution disabling and enabling the plugin. But it is a sugjestion if you plan on further develop the plugin.

Anyway other than that i am veary satesfied with the plugin, thanks.

Best regards Jostein
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Plugin for Spotify

Post by krambriw »

Hello,

First of all, I think the bug described by Jostein should be fixed

Attached is a new version that also implements some new actions
- Stop
- Play
- Minimize and stop playing
- Terminate Spotify

To upgrade: replace the file __init__.py

I think its easiest to make a new configuration but you can try with the current first. Maybe you will miss some actions but they can be added manually

As you can see in the picture, I have also made a macro to start Spotify if needed. If you need this, you will have to create it manually but it is very simple to do

Best regards, Walter
Image1.jpg
__init__.py
(11.95 KiB) Downloaded 659 times
Post Reply