Page 7 of 12

Re: Spotify

Posted: Thu Sep 13, 2012 2:26 pm
by krambriw
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

Re: Spotify

Posted: Sat Sep 15, 2012 6:22 pm
by husa550
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
I'l make a gui-file for you.
Working all weekend but do it as soon as possible!
Do you want for iphone or ipad?

Re: Spotify

Posted: Sat Sep 15, 2012 6:41 pm
by krambriw
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

Posted: Sun Sep 16, 2012 10:02 am
by husa550
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
Check your PM !

Re: Spotify

Posted: Sat May 11, 2013 12:49 am
by MANswers
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

Re: Spotify

Posted: Sun May 12, 2013 6:14 pm
by krambriw
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

Re: Spotify

Posted: Tue May 14, 2013 7:31 am
by MANswers
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

Posted: Wed Oct 02, 2013 5:19 pm
by opitmalt
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

Posted: Tue Nov 05, 2013 1:55 pm
by Samme
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?

Re: Spotify

Posted: Tue Nov 05, 2013 3:10 pm
by krambriw
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

Re: Spotify

Posted: Tue Nov 05, 2013 3:17 pm
by Samme
Hi again!

Yes I run W7 64 bits, is that the reason? I have gotten it to work before...

Re: Spotify

Posted: Tue Nov 05, 2013 4:09 pm
by krambriw
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...

Re: Spotify

Posted: Tue Nov 05, 2013 4:16 pm
by krambriw
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



Re: Spotify

Posted: Tue Nov 05, 2013 5:40 pm
by Samme
Thanks a lot Walter!

That fixed it!

Re: Spotify

Posted: Wed Dec 18, 2013 2:34 pm
by leothlon
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.