maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [application] pyPianobar (with pianobar) (https://talk.maemo.org/showthread.php?t=42104)

fatalsaint 2010-01-25 04:31

[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:
  • Login to pianobar via username/password popup box
  • Skip Songs
  • Play/Pause
  • Change Stations
  • "Like" songs
  • "Hate" songs
  • Display Title, Artist, and Album
  • Display album art
  • Complete integration with the pianobar default config file (~/.config/pianobar/config)
  • Create & Delete stations
  • Configure Last.fm username/password (requires restart of pyPianobar)
  • Snooze
  • Mark songs "Tired"

Known Issues:
  • Station list will not load if an auto-play station is in the config-file.
  • Python-Qt4 bindings are non-optified! Keep this in mind! Reports say it takes 44MB of rootfs. -- No longer an issue.

To be done:
  • Add more skins. Currently "white" is the only one.

How??
  1. We are in Extras!
  2. Locate pyPianobar in Application Manager and Install
  3. Launch pyPianobar from Applications menu
  4. If you have an N800/N810, please see these instructions instead.
Vote for Pianobar here, and pyPianoar here to promote to Extras!!! Pick the current version in Extras Testing ARMEL.

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!

Thorprime 2010-01-25 18:09

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)

fatalsaint 2010-01-25 18:10

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

ceroberts75 2010-01-25 18:22

Re: [application] pyPianobar (with pianobar)
 
following the thread

fatalsaint 2010-01-25 19:43

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?

Thorprime 2010-01-25 20:04

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?

fatalsaint 2010-01-25 21:46

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.

Thorprime 2010-01-25 21:48

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?

fatalsaint 2010-01-25 21:52

Re: [application] pyPianobar (with pianobar)
 
Quote:

Originally Posted by Thorprime (Post 494417)
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?

I've never used that... I always just used the Thumbs Up/Down (+ / -).

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.

fatalsaint 2010-01-25 22:22

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?


All times are GMT. The time now is 17:44.

vBulletin® Version 3.8.8