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 (api is partially broken)
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
That looks really nice!
You know, I use a library for the api and the fanart is not supported there but if we find a way how to grab it and send it, for sure it would be nice. I am not an expert on the Command Fusion plugin but using serial was easy it showed.
Are you good in using the guiDesigner? Could you do me a favour and just make a simple project with one page presenting what is sent with serial? No fancy stuff needed, just that simple feature? I have guiDesigner and could open the simple project just to have a glance how this is done.
Best regards, Walter
EDIT: If you look back on page 4 in this thread, there is a method mentioned how the fanart can be captured and saved as jpg. Remains just to find out how we shall send a jpg to the phone
You know, I use a library for the api and the fanart is not supported there but if we find a way how to grab it and send it, for sure it would be nice. I am not an expert on the Command Fusion plugin but using serial was easy it showed.
Are you good in using the guiDesigner? Could you do me a favour and just make a simple project with one page presenting what is sent with serial? No fancy stuff needed, just that simple feature? I have guiDesigner and could open the simple project just to have a glance how this is done.
Best regards, Walter
EDIT: If you look back on page 4 in this thread, there is a method mentioned how the fanart can be captured and saved as jpg. Remains just to find out how we shall send a jpg to the phone
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
I'l make a gui-file for you.krambriw wrote:That looks really nice!
You know, I use a library for the api and the fanart is not supported there but if we find a way how to grab it and send it, for sure it would be nice. I am not an expert on the Command Fusion plugin but using serial was easy it showed.
Are you good in using the guiDesigner? Could you do me a favour and just make a simple project with one page presenting what is sent with serial? No fancy stuff needed, just that simple feature? I have guiDesigner and could open the simple project just to have a glance how this is done.
Best regards, Walter
EDIT: If you look back on page 4 in this thread, there is a method mentioned how the fanart can be captured and saved as jpg. Remains just to find out how we shall send a jpg to the phone
Working all weekend but do it as soon as possible!
Do you want for iphone or ipad?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Thanks m8,
For iPhone would be great! In the mean time I have made a macro that captures the fanart as a jpg based on the code I referred to and it works pretty neat. If you could find out how we could send a jpg file to to Command Fusion, I will include this in an updated plugin.
Best reg Walter
For iPhone would be great! In the mean time I have made a macro that captures the fanart as a jpg based on the code I referred to and it works pretty neat. If you could find out how we could send a jpg file to to Command Fusion, I will include this in an updated plugin.
Best reg Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Check your PM !krambriw wrote:Thanks m8,
For iPhone would be great! In the mean time I have made a macro that captures the fanart as a jpg based on the code I referred to and it works pretty neat. If you could find out how we could send a jpg file to to Command Fusion, I will include this in an updated plugin.
Best reg Walter
Re: Spotify
Thanks for the spotify plugin. i am using this with eg for iRule. is there any update with new features on this plugin? anyone tried using a gui frontend on their iphone or ipad for feedback and changing tracks or controlling the player?
I am talking about something similar the JRiver Media Player has called the Gizmo that can be used on any device to control the player
I am talking about something similar the JRiver Media Player has called the Gizmo that can be used on any device to control the player
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hi, thanks,
I made this plugin almost 4 years ago with great help using the 'pytify' wrapper made by Bjoerge Naess. A re-work could be justified. There has been some interesting movements in terms of python support for Spotify like 'pyspotify' and 'spotimeta'. With those wrappers I believe it would be a rather normal effort to make a new plugin supporting additional feaures like search and look artists. This plugin could then become a real Spotify client built into EG instead of as it is now, EG controlling the Spotify application.
Best regards, Walter
I made this plugin almost 4 years ago with great help using the 'pytify' wrapper made by Bjoerge Naess. A re-work could be justified. There has been some interesting movements in terms of python support for Spotify like 'pyspotify' and 'spotimeta'. With those wrappers I believe it would be a rather normal effort to make a new plugin supporting additional feaures like search and look artists. This plugin could then become a real Spotify client built into EG instead of as it is now, EG controlling the Spotify application.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Thanks for your reply Walter, are you planning to update anything for this plugin? Spotify is getting pretty famous now around the world and particularly the US. I believe every few weeks more and more users are linking their facebook account with spotify.
Re: Spotify
I downloaded the Spotimeta library for getting data from Spotify's metadata API and can now use it to save the coverart of the song currently playing as C:\spotify.png:
Code: Select all
import spotimeta
import urllib2
import urllib
import json
urllib.urlretrieve(json.load(urllib2.urlopen("https://embed.spotify.com/oembed/?url=" + spotimeta.search_track(eg.plugins.MySpotify.GetCurrentArtist() + u' - ' + eg.plugins.MySpotify.GetCurrentTrack())["result"][0]["href"]))['thumbnail_url'].replace("cover","640"), "c:\\spotify.png")
Re: Spotify
Hi Walter!
Do you know if this plugin have stopped working with newer versions of Spotify? Atleast it isn't working for me.
Running the macro "Start Spotify" gives "The directory name is invalid.".
Any ideas?
Do you know if this plugin have stopped working with newer versions of Spotify? Atleast it isn't working for me.
Running the macro "Start Spotify" gives "The directory name is invalid.".
Any ideas?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hello,
Just tried it here, it works fine to both start, play, stop and terminate Spotify (tried with Vista 32 bit)
Do you run W7 64 bit?
Best R Walter
Just tried it here, it works fine to both start, play, stop and terminate Spotify (tried with Vista 32 bit)
Do you run W7 64 bit?
Best R Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Hi again!
Yes I run W7 64 bits, is that the reason? I have gotten it to work before...
Yes I run W7 64 bits, is that the reason? I have gotten it to work before...
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
I have the same error when I try it with W7 64 bit...it seems that Spotify is not installed under the normal path like "Program...", instead it is installed under ..\AppData\Roaming\Spotify
At least in my laptop...
At least in my laptop...
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
You can change the path in the plugin code yourself. Find this section and modify it accordingly
Code: Select all
class StartSpotify(eg.ActionClass):
name = "Start Spotify"
description = "Starts Spotify"
def __call__(self):
eg.plugins.System.Execute(
u'C:\\Program Files\\Spotify\\spotify.exe',
u'',
0,
False,
2,
u'C:\\Program Files\\Spotify'
)
return
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Thanks a lot Walter!
That fixed it!
That fixed it!
Re: Spotify
Is it possible to have the plugin trigger an event when spotify song changes?
I want to send the new information to command fusion or a webpage when it changes instead of having to request the data on set timers all the time (have websockets send out the new data to website rather than updating the page every 10-ish seconds).
same with the code above that alows getting the coverart, i want that to trigger getting the new coverart right away when spotify changes song.
I want to send the new information to command fusion or a webpage when it changes instead of having to request the data on set timers all the time (have websockets send out the new data to website rather than updating the page every 10-ish seconds).
same with the code above that alows getting the coverart, i want that to trigger getting the new coverart right away when spotify changes song.