emesene forum
July 31, 2010, 01:16:19 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: CACHE KEY ERRORS? NICK NOT SAVED? UPGRADE TO 1.6.2 FIRST!

REPORT ANY ISSUE HERE - PLEASE CHECK IF THE PROBLEM HAS ALREADY BEEN REPORTED FIRST -- THANKS
 
  Home   Forum   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CurrentSong for Spotify  (Read 1357 times)
x1sc0
improving haxxor™
Hero Member
*****

l33tness: 10
Offline Offline

Posts: 105


View Profile Email
« on: December 22, 2009, 08:34:27 AM »

I've created a version of currentsong for spotify under wine based on http://github.com/pilt/spotify.
i had some problem to do using the python file because it doesn't work anymore so I decided to used the shell script. I tried to do my best but i'm sure it's not the most efficient. Anyway I think it does what it has to do.
Please try it and let me know if you find any problem.

BTW, if you don't have an account yet, you can sign up here:  http://www.nower.se/spotify/

adéu
Logged
C10uD
ololol
Administrator
Hero Member
*****

l33tness: -9990
Offline Offline

Posts: 2308



View Profile Email
« Reply #1 on: December 22, 2009, 12:17:04 PM »

xisco, get rid of the script and we can have a deal
Logged
x1sc0
improving haxxor™
Hero Member
*****

l33tness: 10
Offline Offline

Posts: 105


View Profile Email
« Reply #2 on: December 22, 2009, 04:07:13 PM »

Ok, I passed it to python and  surprisingly it works !!! I'm proud of myself.
Enjoy it.

* Spotify.py is placed in currentsong folder
Logged
C10uD
ololol
Administrator
Hero Member
*****

l33tness: -9990
Offline Offline

Posts: 2308



View Profile Email
« Reply #3 on: December 23, 2009, 03:46:07 AM »

great, applied
Logged
jaansson
Newbie
*

l33tness: 0
Offline Offline

Posts: 1


View Profile
« Reply #4 on: December 27, 2009, 09:57:12 AM »

Oh, this seem awesome! But I can't seem to get it working. I've tried putting this Spotify.py in the .config/emeseme/plugin folder and the same/currentsong folder AND the /usr/shared/emesene/pluginsomething/currentSong folder. I also tried throwing in the .diff file. I've been reloading the plugins and stuff, but I must be doing something wrong. Would appreciate some help Smiley Oh, and I used the files that you uploaded the second time.
Logged
C10uD
ololol
Administrator
Hero Member
*****

l33tness: -9990
Offline Offline

Posts: 2308



View Profile Email
« Reply #5 on: December 28, 2009, 02:40:25 AM »

download emesene svn and it will work out of the box Smiley

otherwise apply the diff AND move the spotify plugin to plugins_base/currentSong Smiley
Logged
karasu
Hero Member
*****

l33tness: 4
Offline Offline

Posts: 285


Noein

gustaucastells@hotmail.com
View Profile WWW
« Reply #6 on: February 07, 2010, 02:56:42 PM »

I just wanted to say thanks to x1sc0 !!!

It works perfectly well...

Thanks!!!
Logged

I a vegades... els ocells fan cagarades...
karasu
Hero Member
*****

l33tness: 4
Offline Offline

Posts: 285


Noein

gustaucastells@hotmail.com
View Profile WWW
« Reply #7 on: March 08, 2010, 10:14:37 AM »

Hi!

I want to propose a little fix, as I get some white spaces before and after song title and an ending " that makes current song plugin not find covers.

(attached)
Logged

I a vegades... els ocells fan cagarades...
arielj
Administrator
Hero Member
*****

l33tness: 30
Offline Offline

Posts: 1362


globitz!


View Profile Email
« Reply #8 on: March 08, 2010, 12:46:50 PM »

applied!
Logged
ukblacknight
Sr. Member
****

l33tness: 4
Offline Offline

Posts: 87



View Profile
« Reply #9 on: March 09, 2010, 05:23:58 AM »

Great work!  I looked into implementing this myself, but it seemed quite hacky so I couldn't be bothered Tongue

There seems to be a performance issue though - emesene seems slightly unresponsive when the music plugin is enabled with spotify, such as it takes half a second or so for characters to appear when typing in the conversation windows, and so on.

I'm guessing it could be hard to get feedback on this since only a few countries have Spotify, so I'll try my best to help solve this Smiley
Logged
ukblacknight
Sr. Member
****

l33tness: 4
Offline Offline

Posts: 87



View Profile
« Reply #10 on: March 09, 2010, 06:55:02 AM »

RE: Performance
Code:
        strout = os.popen("xwininfo -root -tree", "r")
       
        for line in strout.readlines():
            if "(\"spotify.exe\" \"Wine\")" in line:
                if "has no name" not in line:
                    if "\"Spotify\": (\"spotify.exe\" \"Wine\")" in line:
                        self.artist = ''
                        self.title = ''
                        return True
                    else:
                        aux = line

Could this loop be the culprit?
Logged
karasu
Hero Member
*****

l33tness: 4
Offline Offline

Posts: 285


Noein

gustaucastells@hotmail.com
View Profile WWW
« Reply #11 on: March 09, 2010, 11:14:42 AM »

 Well, perhaps this is the problem:

Code:
os.popen("xwininfo -root -tree", "r")

This is running xwininfo each time we want to check if song has changed.

Anyway, I didn't notice that emesene was slower using spotify.... :S
Logged

I a vegades... els ocells fan cagarades...
Gizzmo
Newbie
*

l33tness: 0
Offline Offline

Posts: 1


View Profile
« Reply #12 on: July 15, 2010, 02:30:49 AM »

Now that there is a native Spotify client for Linux (http://www.spotify.com/se/download/previews/), its time to update this script or make a new one. Can it be done?
Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v.1.0.6 beta 2 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!