![]() |
[Maemo 5] Pianobar port - command line Pandora client
I got pianobar (http://6xq.net/html/00/17.html) to work on my N900 over the weekend.
It is a command-line client for Pandora (www.pandora.com) and depends on two libraries, libmad0 and libao0, which should be in extras-devel. I have checked the license, and as far as I can tell it's completely unrestricted. fatalsaint is now maintaining a package, so please check his post here for packages and updates: http://talk.maemo.org/showpost.php?p...3&postcount=11 There is another thread discussing the future development of a GUI for pianobar here: http://talk.maemo.org/showthread.php?t=39027 as well. |
Re: Pianobar port - command line Pandora client
Thanks for the port - now just to wait for pandora to become unrestricted in the UK or for pianobar to get it's proxy function working :)
|
Re: Pianobar port - command line Pandora client
Thanks! I love pandora radio! :D :D
|
Re: Pianobar port - command line Pandora client
Actually there is proxy functionality in pianobar, the config file is located at ~/.config/pianobar/config and has options for it, although I've not had to use it since I'm in the US.
Here's a sample config file. Code:
# This is an example configuration file for pianobar. You may remove the # from |
Re: Pianobar port - command line Pandora client
Thanks so much for this!
Unfortunately I seem to be too stupid to figure out how to install/run from the binary you provided :-/ hehe. Any help? |
Re: Pianobar port - command line Pandora client
Install the appropriate libraries via apt-get, libao0 and libmad0, (they may be in devel, so you install at your own risk) then run the executable from the X Terminal Emulator from wherever you downloaded it to.
I'm looking into packaging it, but pianobar uses CMake, so I'm having trouble with dpkg-buildpackage. |
Re: Pianobar port - command line Pandora client
the megaupload link is down.
|
Re: Pianobar port - command line Pandora client
Quote:
Thanks |
Re: Pianobar port - command line Pandora client
This is great! Thank you very much.
By the way, here is a link to the manpage: http://github.com/PromyLOPh/pianobar...src/pianobar.1 Sadfist, if you saved the file to the root "N900" directory then just put this into the terminal: root cd /home/user/MyDocs chmod 755 pianobar cp pianobar /usr/bin correction: mv pianobar /usr/bin chmod 755 /usr/bin/pianobar |
Re: Pianobar port - command line Pandora client
Quote:
EDIT: nevermind, I just noticed you put cp not mv. chmod didn't carry over to the copy. Now I just have to figure out my username/password, lol. |
Re: Pianobar port - command line Pandora client
A package file to test for pianobar. It should include the example, all commented out, config file in /home/user/.config/pianobar.
http://packages.linuxniche.net/pianobar_1.1-0_armel.deb I don't have an N900 so this has not been tested on a real device.. but installs fine in my scratchbox SDK environment. Please test the depends by removing libmad0 and libao0. After running "dpkg -i pianobar-1.0-1.deb" it should fail with a list of dependencies.. then run "apt-get -f install" which should automatically pull down libmad0 and libao0 for you. Let me know.. ETA: Just being clear: do not install this unless you don't mind something breaking. This is completely untested. UPDATE: 1.0-3 updated. Should be optified, contains stripped binary, has real man page, and a changelog! UPDATE: 1.1-0 updated. Built on the latest pianobar source, evidently pandora updated their libpiano requirement yesterday which breaks all older versions of pianobar. Compiled new sources (e079b45). |
Re: Pianobar port - command line Pandora client
I dont even know how to flash mine back if I break it so I will pass on testing it until its atleast non destructive :D
Soon as it gets to the repo even if its buggy I'll be sure to test it. |
Re: Pianobar port - command line Pandora client
Ok.. I fixed that :D. Now it is at least not overtly totally system destructive ... :).
Now it creates the default config into /etc/pianobar/config, and checks if /home/user/.config/pianobar/config exists. If it does not, it will copy it. I don't know why.. but if you directly put /home path into the deb files it want to remove it... badddd. |
Re: Pianobar port - command line Pandora client
I went ahead and installed the 1.0.2 version of the package today. I can tell you that "apt-get -f install" worked fine and nothing seems to have been destroyed by the package yet :)
Been using it all day with good results. |
Re: Pianobar port - command line Pandora client
Thank you ;). The scary part is of course when you try to remove it :D. Thats when the fishy error showed up in -1 that I *appear* to have fixed.
Beyond that.. I think it's pretty much set. It doesn't pass lintian ATM because it doesn't like me copy/pasting the description field. So once I fix it to pass a lintian check, and add a changelog.. I think it could be put to extras-devel. I wanted more testing on it first tho...... Damn this not having a device is really bugging me. I'm working a PyQT frontend for it to.. |
Re: Pianobar port - command line Pandora client
Fantastic! This worked perfectly and the app seems to work great.
|
Re: Pianobar port - command line Pandora client
Well this is just great. Low CPU eater and nice and simple. Thanks. Might play with making this run on a script and tie it to an icon etc.
|
Re: Pianobar port - command line Pandora client
I figured I'd get an icon and stuff going with the PyQT4 app.. since an icon for a terminal app is a little redundant.. just launch a terminal :).
It's actually not too bad.. I have one that can control via either the fifo file, or directly with popen... but retrieving information *from* it is being a tad problematic. :( |
Re: Pianobar port - command line Pandora client
Quote:
I assume you have checked out this thread http://www.qtforum.org/post/57848/ho...ping#post57848 Has some nice code about halfway down that deals with running a process and handling the returned text etc. |
Re: Pianobar port - command line Pandora client
Brilliant! This works like a charm! :cool: Many thanks for the work!
|
Re: Pianobar port - command line Pandora client
Quote:
In ruby I'd have it pretty functional already. I've done some I/O work in ruby and thanks to the wonder "read_nonblock" method to IO.popen makes it a breeze. Unfortunately I'm not finding it in python. Using just popen, I can get it to output the pianobar text to the terminal screen... and I can write to it from the buttons. So it's pretty much completely functional in control... I have a Stop, Next, Love, Hate, and Play/Pause button that all work great. Unfortunately.. I can't read any of the text out in order to display helpful things like Song Title, Artist, and whether or not you've previously marked it as Liked or not. I've messed with popen2-4 so far.. and using any of those I get nothing at all... pianobar doesn't seem to execute at all. I think part of that problem is pianobar itself.. if you try to launch it in a terminal with "pianobar &" it will actually immediately stop. Pianobar doesn't like having a noninteractive startup it seems. I'm debating whether I should just take the shortcut like this guy. He has a working GTK version to control pianobar, including adding/removing stations.. but selecting which station to play is annoying because he has the same problem I do - he can't pull anything back from pianobar so listing the station list is out. He just lets you put in your station number into a dialogue box and listen from there. |
Re: Pianobar port - command line Pandora client
I figured it out... subprocess' popen works better than the deprecated os popen.. and using stdin=PIPE/stdout=PIPE it works.
Moving discussion here.. that's where it belongs anyway. I'll update the pianobar deb file soon with the changelog file and a real man page (right now the man page is empty, but it does come with one in the source, I've found it and moved it to the right place now). Also, I'll get it to pass a lintian check... after that - not much more can be done with a single binary deb file. 1.0-3 will probably be the last one till pianobar updates. |
Re: Pianobar port - command line Pandora client
I had never heard of pianobar before tonight and now it could possibly one of my favorite thing i've put on my n900! I love pandora.com but it just bogs down my n900 but with pianobar all is well with the world! And to top things off piano bar plus a desktop launcher icon ( http://www.themaemo.com/howto-launch...om-a-shortcut/ ) = homemade pandora app! i'm so happy! :)
|
Re: Pianobar port - command line Pandora client
Updated my post with 1.0-3.
Contains changelog, optified, real man page... the only warning in lintian now is that it doesn't know what user/multimedia section is. I pulled that straight from another maemo package so don't blame me! :p |
Re: Pianobar port - command line Pandora client
Another update. All older pianobar's are broken as of today (some update on pandora's end). New sources uploaded today to PromyLOPh's website (e079b45).
I compiled the new one and it works fine. Remember, only testing I can do for these debs is Upgrade, remove and install in my SDK. All performed without error. |
Re: Pianobar port - command line Pandora client
ok so pianobar was working great yesterday but today not so much. I keep getting the following error when i try to login?
~ $ pianobar Welcome to pianobar! [?] Username: myemail@goeshere.com [?] Password: (i) Login... Error: Protocol incompatible. Please upgrade libpiano. ~ $ I tried doing some research on the issue and it seems like its happened to people using desktop linux boxes but i was the only instance of this issue on a n900. Anyone have any ideas? |
Re: Pianobar port - command line Pandora client
Read my post directly above yours and get the new update.
|
Re: Pianobar port - command line Pandora client
Could someone tell me... since I don't have an N900: If you are listening to pianobar, and enable the FM Transmitter, will it go out through that? I would assume so (all sounds goes through the transmitter when enabled) - but I just want verification. I desperately want to never again listen to normal radio once I get my N900 :D.
|
Re: Pianobar port - command line Pandora client
thank you so much! maybe i should learn to read through a thread before posting my problems hehe after updating with your newest package everything works like a dream again :) thx
|
Re: Pianobar port - command line Pandora client
Wow, this looks great. So, since I have an N800 (you knew this was coming from someone eventually)...any chance you might be able to port this to work with Diablo (OS2008)? Please? :D That would really make my day, as I love Pandora but find that using it in the browser is just not really feasible.
I'm sure you'd get lots of love from all the N800/810 users out there as well. Anyways, just thought I'd ask. |
Re: Pianobar port - command line Pandora client
Quote:
It's slightly optified... so places a binary in /opt/pianobar/ but honestly that shouldn't matter on your N800 because of the link in /usr/bin/pianobar that points to it... doesn't matter where the actual binary is. Yeah.. I'm pretty sure it would just work. If you don't want to try it, I'll do it when I get home tonight with my N810. If it doesn't.. I most certainly can build one (assuming, again, libao0 and libmad0.. if I have to also provide those it'll get more complicated - but I'll see what I can do either way.) |
Re: Pianobar port - command line Pandora client
pianobar does work through the fm radio transmitter. That was my original intention when I tried to make it work initially, and I'm glad to say it worked out. Have you considered putting your package up in extras-devel or the like?
|
Re: Pianobar port - command line Pandora client
Quote:
|
Re: Pianobar port - command line Pandora client
Quote:
|
Re: Pianobar port - command line Pandora client
just a quick question, has anyone tried setting up the pianobar config file? I cant seem to get it to auto login (yes my user name and password are correct) and i have tried both config file locations mentioned in this thread ( /home/user/.config/pianobar/config and /etc/pianobar/config ). I also cant seem to get the autostart station to work either ( i assume it takes an integer which represents one of your stations). Anyone else have similar issues or figure out how to fix?
|
Re: Pianobar port - command line Pandora client
Both of those work for mine... The auto-station is a really long number. The way you see is to run pianobar and start a station, you will get something like:
Quote:
The username and pass work as advertised for me... I put it in /home/user/.config/pianobar/config. But, this is all in the SDK, not on an N900 directly. |
Re: Pianobar port - command line Pandora client
thanks fatalsaint :) i deleted the /home/user/.config/pianobar/config file and made a new one and it started working... i think the issue might have been that i had made the file in windows and used scp to put it on the n900, maybe something to do with windows and unix file format? anyway it works now and thats all i care about! and the autostart station works as well! This quickly becoming the most used app on my phone :)
|
Re: Pianobar port - command line Pandora client
Awesome work! Newest version runs much better. Skips a lot less and much less severely! Thanks!
|
Re: Pianobar port - command line Pandora client
Quote:
|
Re: Pianobar port - command line Pandora client
Quote:
|
All times are GMT. The time now is 15:17. |
vBulletin® Version 3.8.8