News for hackers. Stuff that matters.
Re:Pianobar command-line Pandora client by swirlee on Thursday January 27, 2011 @06:55PM (#2150153)
Interesting. As gilesc points out, this is only possible by reverse-engineering (i.e. decompiling) the Flash client to get the encryption and decryption keys (crypt_key_input.h and crypt_key_output.h [1]). It's actually pretty easy to do this--I did the same thing a few years ago as a weekend project. So why didn't I release it? Well, IANAL, but I think there are potential legal repercussions to this kind of reverse-engineering.

And, as gilesc also points out, Pandora regularly changes their encryption keys, which makes maintaining this kind of software kind of obnoxious. (The solution to that problem, I think, is to make the software download and parse the .swf file on startup or just on failure to yank out those fresh encryption keys itself, but I never tried it.)

I just cringe a bit when I see these sorts of apps, not because I think they shouldn't exist (seriously, Pandora, just release a goddamn API), but because I'm just picturing the lawsuit hammer coming down on the well-intentioned developers who are just Pandora fans.

Regardless, I applaud PromyLOPh's work and am keeping my fingers crossed for his continued lack of legal fees.

[1]: https://github.com/PromyLOPh/pianobar/tree/master/src/libpia...

Re:Pianobar command-line Pandora client by nuclear_eclipse on Thursday January 27, 2011 @07:36PM (#2150277)
If you're running Linux and/or Gnome, I have two projects to plug:

Pithos is a Gtk client that uses the core libraries from Pianobar to provide a very nice GUI client for Pandora that fully integrates with the latest Gnome/Ubuntu desktop. http://kevinmehall.net/p/pithos/

The second is a set of scripts that I wrote that build on top of the Pianobar client itself to implement media keys and notify-osd support for Ubuntu, although it is incomplete because I myself have switched to using Pithos instead. https://github.com/jreese/pianobar-python

Re:Pianobar command-line Pandora client by nirmal on Thursday January 27, 2011 @04:29PM (#2149575)
Should probably have linked directly to the github repo https://github.com/PromyLOPh/pianobar
Re:Pianobar command-line Pandora client by mickdarling on Thursday January 27, 2011 @06:15PM (#2150015)
I use it as well, and have been meaning to dig into the code to setup automatic login and playing. I think the stream that it accesses is completely advertising-free too. But I would gladly listen to the pandora ads on it since it runs with SO MUCH LESS memory and CPU than any other player.
Re:Pianobar command-line Pandora client by btucker on Thursday January 27, 2011 @06:29PM (#2150059)
Make a config file: ~/.config/pianobar/config that looks like this: user = [email protected] password = mypassword
Re:Pianobar command-line Pandora client by naner on Thursday January 27, 2011 @10:06PM (#2150616)
I think the stream that it accesses is completely advertising-free too.

I don't think it has to do with the stream. When an ad comes up it just fetches a new playlist.

Re:Pianobar command-line Pandora client by siong1987 on Thursday January 27, 2011 @07:28PM (#2150250)
If you have homebrew installed, just simply "brew install pianobar".
Re:Pianobar command-line Pandora client by gilesc on Thursday January 27, 2011 @06:02PM (#2149958)
I like and use it, but it's based on reverse-engineering Pandora's encryption keys, so every once in awhile (when Pandora changes the keys), it breaks the client, which is annoying.
Re:Pianobar command-line Pandora client by naner on Thursday January 27, 2011 @10:03PM (#2150607)
I've used the pianobar client for a long time. (I'm on Linux and there's no official native client.) It breaks every so often and you have to wait a day or so for it to get fixed. A 'feature' of this unofficial client is that it doesn't play any of the ads on free Pandora accounts. So Pandora probably isn't very happy with that.
Re:Pianobar command-line Pandora client by dcreemer on Thursday January 27, 2011 @10:50PM (#2150719)
I love pianobar- I use it daily and love the fact that it uses very little emory especially compared to the Flash-based official clients.

I'm not sure what the official Pandora position regarding pianobar is, but I did hear from an employee that they have worked to disable it in the past.

Re:Pianobar command-line Pandora client by mhd on Thursday January 27, 2011 @07:19PM (#2150211)
In a similar vein, shell-fm[1] is a command line client for last.fm streaming. Supports remote control, too (IIRC it uses a socket whereas pianobar uses a named pipe).

[1]: http://nex.scrapping.cc/shell-fm/

Re:Pianobar command-line Pandora client by carterschonwald on Thursday January 27, 2011 @07:17PM (#2150205)
its worth mentioning that mac homebrew already has a formula for installing this, and it builds and runs without a hitch.
Re:Pianobar command-line Pandora client by snprbob86 on Thursday January 27, 2011 @07:36PM (#2150275)
Forgive the totally off-topic thread, but is Homebrew generally considered mature/stable?

I remember reading about it a year or so ago and being slightly skeeved out by the chmod and chown voodoo you had to do to install it. Skimming over the Homebrew install script seems like it does a lot of similar stuff, which seems strange for a package manager that claims isolated installation of packages in user-land.

And is it intended to completely replace MacPorts, or do they place nice together?

Re:Pianobar command-line Pandora client by wfarr on Thursday January 27, 2011 @09:11PM (#2150509)
It makes /usr/local owned by the current user rather than root. Not much in the way of voodoo. ;)

It's basically a replacement for MacPorts.

Re:Pianobar command-line Pandora client by snprbob86 on Thursday January 27, 2011 @11:49PM (#2150836)
See this section of the hierarchical filesystem guidelines for unix-like OSes:

http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY

and in particular:

http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHI...

Isn't root supposed to own that?

Re:Pianobar command-line Pandora client by wfarr on Sunday January 30, 2011 @08:58AM (#2158047)
They're guidelines.

In the case of OS X laptops, they're almost uniformly used as single-user machines. This just takes the hassle of having to sudo to do it.

There are a few other reasons they specifically opted for /usr/local instead of other paths here: https://github.com/mxcl/homebrew/wiki/installation

Re:Pianobar command-line Pandora client by dcreemer on Thursday January 27, 2011 @10:46PM (#2150708)
Been using it as a replacement for MacPorts for many months. Works well, easy to maintain. I like it.
Re:Pianobar command-line Pandora client by SageRaven on Thursday January 27, 2011 @07:04PM (#2150173)
Damn, I love this site! It's even in FreeBSD's ports -- how awesome is that? Kudos to the developer!
Re:Pianobar command-line Pandora client by talleyrand on Thursday January 27, 2011 @05:09PM (#2149726)
Love pianobar! Use it daily.