![]() |
[application] pyPianobar (with pianobar)
pyPianobar
pyPianobar is a python2.5-qt4 (PyQt4) front-end for the pianobar Pandora radio client. Why?? Currently, the Pandora website works fine in the N900 browser and thus, many people have decided a GUI application for it is not necessary. I disagreed, as did a couple others. The Pandora website is entirely flash, and while the N900 brings flash to our browser (which is excellent) - flash is also very CPU intensive and sluggish. Pianobar steps in to be extremely lightweight, taking almost no overhead, and permits us to listen to our favorite online radio station in the background. Unfortunately, it's completely command line driven and as such, rather unintuitive. This gave birth to pyPianobar. It is my first PyQt4 application and I welcome any feedback. It controls pianobar in the back-end allowing users to "click" a button to perform tasks. Features:
Known Issues:
To be done:
How??
Why Python?? Simplicity. Using python, not only is this application runnable on the N900 - but it should also work with the next Maemo 6 model if they keep QT compatibility, and it also runs on Desktop Linux. This should, in theory, run on any device that supports python2.5 and qt4. I have included screenshots from the SDK, Desktop Ubuntu, and an N900. Show me the Money! The N900: http://img51.imageshack.us/img51/689...0020410304.png http://img691.imageshack.us/img691/9...0020410312.png http://img519.imageshack.us/img519/2...0020909244.png Thanks Thorprime! The SDK: http://packages.linuxniche.net/SDK-pyPianobar.png Desktop Ubuntu: http://packages.linuxniche.net/Ubuntu-pyPandora.png Special thanks goes to Thorprime for the interface and current screenshots and to Bratag for helping me test on a live N900 device! |
Re: [application] pyPianobar (with pianobar)
Installed on my N900 along with the Python-Qt4 bindings, was just getting seg-faults starting it up. (And yeh, those python Binding do eat alot of root space. About 25MB in root (of the 44MB of packages)
|
Re: [application] pyPianobar (with pianobar)
pyPianobar or just pianobar?
Try running it in a terminal and tell me what it's saying: Code:
python2.5 /opt/pyPianobar/pyPianobar.py |
Re: [application] pyPianobar (with pianobar)
following the thread
|
Re: [application] pyPianobar (with pianobar)
Packages should now be in Extras-Devel. If anyone can confirm for me I'll update the OP so you don't need to download the deb's directly.
If you have it installed previously, it should ask you to upgrade - the versions in Extras-Devel are newer than the OP. Thor - can you test the new one and see if segfaulting is still a problem? |
Re: [application] pyPianobar (with pianobar)
When running it from the terminal, the only output was the segmentation fault. I didn't check for a memory dump. I'll try installing from the repo and let you know how it goes then.
--Edit-- The new version in the repo works great. Awesome Job man. Also, the Icons I sent you were definitely themed for the Orange N900 skin. Should prob add a feature in the todo for creating icon sets to match the other default skin (and maybe a N810 skin as well?) http://img171.imageshack.us/img171/6...reenshot02.png Also, is the "Tired" button supposed to quit? Doesn't seem to output an error when clicked after running from the console, so I assume that is the desired result? |
Re: [application] pyPianobar (with pianobar)
OH!
Yeah I should mention that... So that sleep button actually cleanly exits the program :D. Sorry about that... eventually it will of course popup a timer that will shut the app down after so long. Currently the "after so long" is "now" :D. |
Re: [application] pyPianobar (with pianobar)
Shouldn't the button map to the "t" key in pianobar? Which tells pandora you are tired of the song playing and would like not to hear it again for a while?
|
Re: [application] pyPianobar (with pianobar)
Quote:
Didn't even know a "t" command existed... I just assumed the button was meant for something akin to "snooze" mode on radios. On my android phone I have to use a separate sleeptimer app to close my pandora every night when I go to bed. |
Re: [application] pyPianobar (with pianobar)
So now you've got me thinking. Something like that "tired" I could see being useful and is something that fits better being a button on the main screen with the like and dislike, and moving the "snooze" idea to the menu.
But the problem I see is.. everyone I show the interface to thinks the same thing. The ZZZ is a snooze... I wonder how many people might be telling Pandora that they are tired of a bunch of songs they aren't really tired of if I make it function like that? |
Re: [application] pyPianobar (with pianobar)
I agree that the zzz is somewhat confusing, but I'm having a hard time coming up with an icon that expresses the idea that you are tired of a song. (Pandora hides this feature one menu deep in its UI.)
It seems like the kind of feature that doesn't belong buried in a menu on a tough screen interface, for use say when you are driving. Really what the feature is, is a temp-ban. But I can't really think of an icon for that either.... hmmm... ideas? |
Re: [application] pyPianobar (with pianobar)
I've never really used the Pandora's main website. I was introduced with my G1 using the "official" G1 app.
It annoys you about skipping songs every time you reach 6 per hour, doesn't show song length, lets you Skip, Up, Down, and show/create/delete stations, and Buy. That's it.. So this tired idea is new to me... I get what you're saying it does though. I'll have to think on a button idea.. Remember I'm the one that used ASCII text :D. |
Re: [application] pyPianobar (with pianobar)
Hi,
I downloaded from repo and every time i run pypianobar i get "Painobar experienced an error. We are closing." Can you please help me get it running? |
Re: [application] pyPianobar (with pianobar)
run:
Code:
pianobar |
Re: [application] pyPianobar (with pianobar)
Quote:
It seems to work now. |
Re: [application] pyPianobar (with pianobar)
In a future release I will include the pianobar error message with that quit message. Will definitely help in troubleshooting :).
Thanks for bringing that to my attention. I also plan to make it so that if pianobar fails out unexpectedly, it will reopen it instead of having to kill the entire application. |
Re: [application] pyPianobar (with pianobar)
I uploaded a new pianobar package.. but it's the same pianobar binary. I noticed in my postinst script when I copied over the config file I didn't chown the file to user:users... so it wouldn't do ya much good :D.
Course.. took me 3 update packages to get the stupid thing right >.>. Sometimes I need to slow down and think. I also have a new pyPianobar mostly ready.. just waiting on some testers to get back to me with reports from real N900 devices before I put them into the devel repo's. |
Re: [application] pyPianobar (with pianobar)
Just want to add my support for this. Love Pandora, listened to it all the time on my G1. Can't open it on the N900. When I contacted Pandora a few weeks ago to see if they were considering an app. for N900, their response was, don't hold your breath that it was very unlikely Pandora would devote any attention to this.
|
Re: [application] pyPianobar (with pianobar)
Hi Fatal,
I had pypianobar installed and then i un-installed it and tried installing it again and i am getting missing dependencies Application package missing: python2.5-qt4-opengl How can i fix this? |
Re: [application] pyPianobar (with pianobar)
BTW, also, any plans to make it store username and password, its kind of inconvenient to have to enter those every time you want to use the app....
|
Re: [application] pyPianobar (with pianobar)
Quote:
Im just waiting on testers before that's out. As far as the missing dependencies: PyQt4 was just updated by atilla, some packages may have been in limbo while you updated the repositories. Go into a terminal: Code:
sudo gainroot |
Re: [application] pyPianobar (with pianobar)
Quote:
"The following packages have unmet dependencies: pypianobar: Depends: python2.5-qt4 but it is not going to be installed. e: Broken Packages" |
Re: [application] pyPianobar (with pianobar)
Quote:
http://maemo.org/packages/package_in...t4/4.7-maemo2/ Shows a dependency on python2.5-qt4-opengl that it's saying doesn't exist. What do you get if you run: Code:
apt-get install python2.5-qt4 |
Re: [application] pyPianobar (with pianobar)
Ok, well I've uploaded a new version of pianobar that is built on the lastest sources from the primary site. Version e079b45.
I also decided to go ahead and submit pypianobar 0.9 into the repositories. This might fix your dependency problem.. instead of depending on the *entire* python2.5-qt4 set of packages I specifically put python2.5-qt4-gui in there. Should require much less to be downloaded, and will hopefully get around your problem. I really need testers on this version.. you should have four new menu options: User/Pass Lastfm.User/Pass Station Create Station Delete I have also improved error management, if pianobar crashes for any reason it will tell you what pianobar said, and it will try to restart it 3 times. After the third consecutive crash it will shutdown the app. As soon as a song or station list is retrieved it resets that counter to 0. There have been several other odds and ends added... please, please, please provide feedback on the new version. |
Re: [application] pyPianobar (with pianobar)
I've promoted pianobar to Extras-Testing.
As it's the base for both mine and Bratag's Front-ends, and requires very little maintenance.. I would like it to get voted on and pushed to extras so everyone can at least have pandora radio from the command line :). Vote! |
Re: [application] pyPianobar (with pianobar)
I entered what I though was my username that was wrong (forgot it was my email). Now the app starts and tries to use this wrong username 3 times and then quits so I never have the chance to enter the correct one. I can use some basic terminal commands and am trying to find out how to clear out my username and password do I can enter the proper ones. Can anyone help me out? Thanks in advance!
|
Re: [application] pyPianobar (with pianobar)
Quote:
cd /home/user/.config/pianobar Then use an editor (probably vi) to look at the config file there. Put in the correct username and password. Save the file then you should be ok. |
Re: [application] pyPianobar (with pianobar)
Quote:
|
Re: [application] pyPianobar (with pianobar)
Updated pianobar as someone noticed I had a typo.
Vote for this one in testing to get it promoted. And what Bratag said is correct, it saved your username and password to "~/.config/pianobar/config". It's a good idea to have pyPianobar trap and invalid user/password and prompt again. Thanks for the feedback, it won't be hard to add. |
Re: [application] pyPianobar (with pianobar)
Oops, forgot that last config entry. Found the file and editing in Leafpad now. Thanks all.
|
Re: [application] pyPianobar (with pianobar)
Quote:
in a terminal: Code:
rm -f /home/user/.config/pianobar/config |
Re: [application] pyPianobar (with pianobar)
Thank you fatalsaint! I am all set now and LOVE that I have Pandora capability on my N900 now. This device gets better every single day.
|
Re: [application] pyPianobar (with pianobar)
Tried out the Station/Create and Station/Delete features and had a couple issues.
1: The Artist/Title input box has white on white text, making it pretty hard to use. (I've heard the user/pass inputs also have this issue, but I didn't test that part) 2: The Artist/Title and yes/no dialog buttons are tiny and grouped tightly together, making it very easy to select the wrong one. As a side note, the "tired" button still exits; it would be great if this sent the 't' key to pianobar... |
Re: [application] pyPianobar (with pianobar)
Quote:
Quote:
|
Re: [application] pyPianobar (with pianobar)
Maybe use a thumbs-down graphic for tired?
|
Re: [application] pyPianobar (with pianobar)
Quote:
ETA: Actually thor, also, since you're the genius of design :D - I'm thinking of remove the station list on the left and instead making that an album graphic... but I'm not sure what to do with the station list after that... put it into a drop down like Bratag did? Make it an selection from the menu? Anyway.. if you are able to think of a way to work in an Album Graphic I think that would be kinda nifty. |
Re: [application] pyPianobar (with pianobar)
Ok, current working model:
http://packages.linuxniche.net/pyPianobar.png Any feedback welcome. ETA: Also, need a graphic for "No Image Available". Because, try as I might.. this just simply will not find all albums. It makes use of SlothRadio Covers to query for the image. |
Re: [application] pyPianobar (with pianobar)
Quote:
http://img33.imageshack.us/img33/4672/screenshot04y.png http://img268.imageshack.us/img268/9...eenshot05y.png http://img33.imageshack.us/img33/2407/screenshot06x.png Quote:
I'll see about getting some Thumbs up/down icons made. As for the album art, if there is an easy way for you to get that from the pandora api, I would agree that switching the station list to a drop-down is probably the best solution for making space on the screen. Hopefully there is a way to get the dropdown larger than it is in qtPianobar, which isn't very finger friendly. |
Re: [application] pyPianobar (with pianobar)
someone make this a final product !
|
Re: [application] pyPianobar (with pianobar)
Well, the first one should be fixed. Should be black text now when entering station/username/pass etc.
As far as the buttons...... not really much I can do about that... It's the way the N900 handles the QT Message Box's :(. If I figure out a way to manipulate the actual layout of a message box I'll see what I can do. In a *normal* python app they show up underneath the text.. not to the right stacked. |
All times are GMT. The time now is 05:14. |
vBulletin® Version 3.8.8