maemo.org - Talk

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

Bratag 2010-01-26 03:47

[application] qtPianobar
 
qtPianobar

Is a qt 4.6 based c++ gui for the pianobar command line application

Why a GUI and also why another pianobar GUI

We all know why we needed a GUI for the command line app. As to why I wrote another pianobar GUI when fatal had already written one. Well the fact is we started writing them at the same time. He went python Qt, I went Qt 4.6 native C++, mostly because I wanted to see what all the fuss was about with Qt and I needed to dust off my c++ skills.

Features
  • Play/pause
  • Skip Song
  • Favourite Song
  • Ban Song
  • Choose Station Dropdown
  • Song Time/left Display

Things to do
  • Decent Username/Password handling
  • Creating Stations
  • General Cleanup of Code

Known issues

Right now the app assumes you have a config file in /home/user/.config/pianobar with the username and password fields uncommented and filled out with your pandora login. It also assumes that you have NOT customized the controls. If you dont have these things then it wont work - simple as that.

For those of you who don't know what the config looks like - here is is

Code:

# This is an example configuration file for pianobar. You may remove the # from
# lines you need and copy/move this file to ~/.config/pianobar/config
# See manpage for a description of the config keys
#
# User
user = your@user.name
password = password

# last.fm scrobbling
#lastfm_user = username
#lastfm_password = password
#lastfm_scrobble_percent = 50

# Proxy (for those who are not living in the USA)
#control_proxy = http://127.0.0.1:9090/

# Keybindings
#act_help = ?
#act_songlove = +
#act_songban = -
#act_stationaddmusic = a
#act_stationcreate = c
#act_stationdelete = d
#act_songexplain = e
#act_stationaddbygenre = g
#act_songinfo = i
#act_addshared = j
#act_songmove = m
#act_songnext = n
#act_songpause = p
#act_quit = q
#act_stationrename = r
#act_stationchange = s
#act_songtired = t
#act_upcoming = u
#act_stationselectquickmix = x

# Misc
# mp3 or aacplus
#audio_format = mp3
#autostart_station = 123456
#event_command = /home/user/.config/pianobar/eventcmd

There are most likely going to be bugs. Post them here until i get the garage page up and running for this thing.

Why Qt

Like it or not - this is where maemo is going. Figured I better get on board early. I also chose Qt 4.6 because the libs are optified and wont chew up your root partition (The app is also optified)

How

I have put it into the queue for extras devel but for some reason its not processing - this is not altogether unusual. In the meanwhile you can grab it from http://thecrayonbox.org/files/N900/q....0-1_armel.deb

You will also need to do from a command line.

apt-get install libqt4-maemo5-core
apt-get install libqt4-maemo5-gui

though if the package is working correctly it should prompt you for those packages.

Screenshot

http://thecrayonbox.org/files/attachment-8TJS6U.png

PS Thanks to fatal for porting pianobar. Excellent stuff.

fatalsaint 2010-01-26 04:11

Re: [application] qtPianobar
 
Looks awesome dude! Why the change of default pianobar controls?

I really like your rendition of the design... its simplistic and yet perfectly functional.

Definitely the optified libs are the way right now until pyqt4 gets there.

ETA: Actually, I dont see any customized controls in your config?? What do you mean?
Quote:

It also assumes that you have customized the controls

Bratag 2010-01-26 04:27

Re: [application] qtPianobar
 
Quote:

Originally Posted by fatalsaint (Post 494908)
Looks awesome dude! Why the change of default pianobar controls?

I really like your rendition of the design... its simplistic and yet perfectly functional.

Definitely the optified libs are the way right now until pyqt4 gets there.

ETA: Actually, I dont see any customized controls in your config?? What do you mean?

What I mean is if they customize the controls - things will go pear shaped :). So um.... dont :)

fatalsaint 2010-01-26 04:35

Re: [application] qtPianobar
 
Quote:

Originally Posted by Bratag (Post 494917)
What I mean is if they customize the controls - things will go pear shaped :). So um.... dont :)

Ohohoh... so you mean "haven't" customize the controls! :D

Makes sense.. mine is the same way for now... good idea in putting that in the OP.

j.s 2010-01-26 05:04

Re: [application] qtPianobar
 
Quote:

Originally Posted by Bratag (Post 494917)
What I mean is if they customize the controls - things will go pear shaped :). So um.... dont :)

You might want to edit your original post. It says the opposite.

Bratag 2010-01-26 05:12

Re: [application] qtPianobar
 
Quote:

Originally Posted by j.s (Post 494942)
You might want to edit your original post. It says the opposite.

Good point - done

Thorprime 2010-01-26 05:23

Re: [application] qtPianobar
 
Awesome job Bratag.
++

Bratag 2010-01-27 18:41

Re: [application] qtPianobar
 
Finally got this thing to build an should be in extras-dev shortly. Be happy if people would vote for it to get it into extras-testing. It includes a truly horrible icon, I will be very happy to accept suggestions/replacements for both the icon and the app in general.

Please note all standard warning messages about how installing stuff from extras-dev can do horrible things to your phone apply (though with this app I cant see that happening)

ViciousXUSMC 2010-01-28 14:54

Re: [application] qtPianobar
 
Bratag what are the requirements for a icon (size & file type) I'll see if I can lend some assistance to you by making one.

mmoylan 2010-01-29 02:59

Re: [application] qtPianobar
 
I installed qtpianobar 1.0-2 and it worked fine the first time that I used it and now anytime I launch it I cant do anything stations control is grayed out no music plays. I am running pianobar 1.1-1 and it runs fine from the command line auto logs in fine, I have not customized any controls, has anyone else experienced this, I hope someone can help me out I know this is not much to go on is there any sort of debug output that I can get from the app.

karim0028 2010-01-30 16:24

Re: [application] qtPianobar
 
Hi Bratag,

I tried installing this and it said that i was conflicting with these libraries.... libqt4-maemo5-dbus, libqt4-mamemo5-xml, libqt4-maemo5-network

I had pypianobar installed previously, i un-installed it and pianobar prior but, something seems messed up now, bc i cant install qtpianobar or pypianobar now...

What am i missing?

karim0028 2010-01-30 16:27

Re: [application] qtPianobar
 
Sorry, it said it conflicted with those qt4 packages..... How can i fix that?

Bratag 2010-01-30 17:27

Re: [application] qtPianobar
 
its saying you have a conflict with those probably because its trying to download a newer version of thw qt4-gui and qt4-core. Those being the only two libs it actually requires. Try updating your other libs.

karmicguy 2010-02-01 15:23

Re: [application] qtPianobar
 
Bratag,

Pretty cool:cool:! Is there any way you can view the album covers and artist info like on the official Pandora application? Thanks for working on this and I hope you will continue to refine the application. This solution is much better than Pandora through the N900 browser at this point, because it doesn't sputter and I can browse and do other things on the device with Pandora merrily playing away in the background -- excellent!

Cheers:)!

Bratag 2010-02-03 16:48

Re: [application] qtPianobar
 
Quote:

Originally Posted by karmicguy (Post 505243)
Bratag,

Pretty cool:cool:! Is there any way you can view the album covers and artist info like on the official Pandora application? Thanks for working on this and I hope you will continue to refine the application. This solution is much better than Pandora through the N900 browser at this point, because it doesn't sputter and I can browse and do other things on the device with Pandora merrily playing away in the background -- excellent!

Cheers:)!

New version out. Changes

* Added next song preview text. The app only gives 3 songs at a time so this may sometimes say no song in queue. It will pick up 3 more the next song advance
* Added ability to configure username/password from menu. This will also create a default config file if you dont have one.
* Added album art. This I am not 100% happy with. Sometimes it doesn't pick up a cover because slothradio is pedantic about its searches. Sometimes you might just see the slthradio web page (or part of it) because the parser I use to pull the cover URL failed. I am working on a better method.

I am not 100% happy with the new layout, but I am playing around with the look of it.

fatalsaint 2010-02-03 17:24

Re: [application] qtPianobar
 
Quote:

Originally Posted by Bratag (Post 508932)
* Added album art. This I am not 100% happy with. Sometimes it doesn't pick up a cover because slothradio is pedantic about its searches. Sometimes you might just see the slthradio web page (or part of it) because the parser I use to pull the cover URL failed. I am working on a better method.

Yeah I'm stuck on this. I have 2 methods.. one that I did for Sloth that works decent and doesn't take long - but because of Sloth's horrible search misses a few albums. Then I found a reference in Pandora FAQ's that they get their album covers from amazon so I found an Amazon parser... but it loads the search page, then the details page, then the image page, then grabs the image. That's 3 web-page loads in the background of the app and increases the album load time dramatically - but it gets a lot more album covers.

I didn't have the problem of parts of the slothradio page showing though... I'd be interested to see your Regex/parser for the graphic.

Bratag 2010-02-03 18:12

Re: [application] qtPianobar
 
Quote:

Originally Posted by fatalsaint (Post 508979)
Yeah I'm stuck on this. I have 2 methods.. one that I did for Sloth that works decent and doesn't take long - but because of Sloth's horrible search misses a few albums. Then I found a reference in Pandora FAQ's that they get their album covers from amazon so I found an Amazon parser... but it loads the search page, then the details page, then the image page, then grabs the image. That's 3 web-page loads in the background of the app and increases the album load time dramatically - but it gets a lot more album covers.

I didn't have the problem of parts of the slothradio page showing though... I'd be interested to see your Regex/parser for the graphic.

Yeah I have a few tips for that stuff - PM me and perhaps we can get a ventrilo or irc session going rather than this message at a time stuff.

EE3547 2010-05-03 23:03

Re: [application] qtPianobar
 
Was hoping someone could help me out. Firstly, this is a great application! Although I have a bit of a problem, and as more of a tinkerer than a dev, I am not sure how to troubleshoot.

I am able to install, load, and connect fine to pandora. Only problem is, when the track is playing there is no sound at all! I can even skip forward and back, and you can see the track countdown timer is going, however no audio comes out. Switch to any other app that has audio, and things work fine.

Any ideas?

EE3547 2010-05-04 12:20

Re: [application] qtPianobar
 
Anyone that can help suggest some course of action?

fatalsaint 2010-05-04 13:01

Re: [application] qtPianobar
 
Can you run "pianobar" from a terminal and let us know if it gives you any kind of error or warnings?

EE3547 2010-05-04 19:34

Re: [application] qtPianobar
 
I ran pianobar from the xterm, and it starts up ok, connects, and then lists the stations. if you pick an option, you then get the track and the countdown on the track length.

No erros :(

EE3547 2010-05-04 19:36

Re: [application] qtPianobar
 
Wow..this is going to be really sad all. I use the silent profile all the time (things work fine in the native media player), but turns out if you toggle to normal, the audio then works. Seems to always auto adjust the audio to work even when using the native media player.

Thanks for the help all!!!


All times are GMT. The time now is 10:30.

vBulletin® Version 3.8.8