drakedevel / gsclient Goto Github PK
View Code? Open in Web Editor NEWGrooveshark command-line client
Grooveshark command-line client
Groovehsark is now shut down, so this project is discontinued. The previous code is available in git history for historical interest.
I'm on Linux Mint 15, "python --version" says 2.7.4 and mplayer is working.
When I run main.py, I get the following errors.
Traceback (most recent call last):
File "main.py", line 184, in
MainCmd().cmdloop()
File "main.py", line 28, in init
self._client = gsclient.ClientWrapper()
File "/home/brian/Desktop/gsclient-master/gsclient.py", line 41, in init
self.new_session()
File "/home/brian/Desktop/gsclient-master/gsclient.py", line 89, in new_session
self._web.start_session()
File "/home/brian/Desktop/gsclient-master/gs.py", line 101, in start_session
self._service.session = self._send(req)
File "/home/brian/Desktop/gsclient-master/gs.py", line 73, in _send
return self._service.send(req, header)
File "/home/brian/Desktop/gsclient-master/gs.py", line 54, in send
data['fault']['code'])
gs.ServiceException: Server returned: invalid client (code 1024)
Hi,
Thanks for your great work! I could try your script about 4 times (very nice!), but now it doesn't work anymore when I type select <sond_Id>, I get the following error:
gscmd> select 29
Traceback (most recent call last):
File "main.py", line 156, in <module>
MainCmd().cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "main.py", line 123, in do_select
self._select(self._results[index - 1])
File "main.py", line 130, in _select_song
(url, postdata) = self._client.get_stream(song)
File "/home/koen/gsclient-master/gsclient/gsclient.py", line 62, in get_stream
print stream_data['streamKey']
TypeError: list indices must be integers, not str
title says it all, i cant find the .mplayer folder I'm looking in /home/pi
Happens in OSX 10.6.8, Python 2.6.1.
help sGS Command Line 0.0, type "help" or "?" for help
gscmd> help select
Select the given index from the last search results.
gscmd> song Infected Mushroom
[ 1] Infected Mushroom - Converting Vegetarians (disc 2: The Other Side) - Converting Vegetarians
[ 2] Infected Mushroom - Converting Vegetarians (disc 2: The Other Side) - I Wish
[ 3] Infected Mushroom - Converting Vegetarians (disc 1: The Trance Side) - Deeply Disturbed
... snip ...
gscmd> select 1
Traceback (most recent call last):
File "./main.py", line 149, in <module>
MainCmd().cmdloop()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/cmd.py", line 219, in onecmd
return func(arg)
File "./main.py", line 119, in do_select
self._select(self._results[index - 1])
File "./main.py", line 129, in _select_song
subprocess.call(['mplayer', '-cache', '2048', '-'], stdin = stream)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 444, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
not sure if this is an issue with this app but, how do u stop mplayer in the middle of a song. I do not want to exit the program (ctrl+c)
i try hitting q to quit, so i can select another song but it doesnt quit.
i have to do a killall mplayer then it exits and gives me the selection prompt again.
mplayer works as it should in my other apps just not with gsclient.
i tryed on 2 machines to be sure. Xubuntu and Archlinux
Thanks i digg the app =D
Running select n
returns:
Traceback (most recent call last): File "./main.py", line 156, in MainCmd().cmdloop() File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "/usr/lib/python2.7/cmd.py", line 221, in onecmd return func(arg) File "./main.py", line 123, in do_select self._select(self._results[index - 1]) File "./main.py", line 130, in _select_song (url, postdata) = self._client.get_stream(song) File "/home/bob/stuff/GSclient/gsclient.py", line 62, in get_stream return ("http://%s/stream.php" % stream_data['ip'], TypeError: list indices must be integers, not str
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.