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)

ceroberts75 2010-02-07 06:04

Re: [application] pyPianobar (with pianobar)
 
what does the app do

fatalsaint 2010-02-07 07:43

Re: [application] pyPianobar (with pianobar)
 
Did you read the OP?

It's a Pandora Radio client front-end.

fatalsaint 2010-02-08 02:47

Re: [application] pyPianobar (with pianobar)
 
And we're in testing!!! Please, go vote. It would be awesome to get a complete Pandora solution into Extras.

Don't forget to also vote for pianobar!!

mfutao 2010-02-08 22:10

Re: [application] pyPianobar (with pianobar)
 
I think its great that you put together a front end for pianobar - but I'm questioning if it makes sense for this to be a separate app than the media player. Does it make sense to integrate this into the default media player?

fatalsaint 2010-02-08 22:12

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

Originally Posted by mfutao (Post 516882)
I think its great that you put together a front end for pianobar - but I'm questioning if it makes sense for this to be a separate app that the media player. Does it make sense to integrate this into the default media player?

If I knew how to integrate I would try. I don't think the default media player is open source though... I believe there was a chris guy that was talking this same thing.

He wanted a universal interface to last.fm, pandora, etc.. but I believe the closedness of the app was a problem.

ETA: Here it is..

Sphinx780 2010-02-09 00:40

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

Originally Posted by fatalsaint (Post 512163)
I'm not sure.. what happens if you try to install python2.5-qt4-gui directly?

Sorry for the additional install question, I'm getting an app missing error "python2.5-qt4-core (=4.7-maemo2)"

So after your earlier tutorial in this thread on trying to install/update in xterm, I tried installing in xterm (sudo gainroot, then apt-get install python2.5-qt4-core) and receive this: is already the newest version and installed.

Any ideas?

fatalsaint 2010-02-09 00:46

Re: [application] pyPianobar (with pianobar)
 
I'm thinking you have some older versions of python mixed with some newer ones maybe?

If you have both Testing and Devel installed there is a discrepancy in PyQt4 versions.. in Testing is maemo2, is devel is maemo5.

I would disable one.. do an update to refresh the repository list, upgrade packages if needed and try again.

Sphinx780 2010-02-09 00:54

Re: [application] pyPianobar (with pianobar)
 
That took care of it, dropped testing, picked up devel and we were set. Thanks!

Bratag 2010-02-09 04:14

Re: [application] pyPianobar (with pianobar)
 
Fatal latest pianobar version doubles up the app and has a bunch of stuff in /usr/local. Any chance we can get the old one back?

karim0028 2010-02-09 14:20

Re: [application] pyPianobar (with pianobar)
 
This latest version is DOA for me anyways... It loads but i get no stations listed in the pull down menu.... So, nothing plays, bc it shows that i have no stations...

Bratag 2010-02-09 14:28

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

Originally Posted by karim0028 (Post 517728)
This latest version is DOA for me anyways... It loads but i get no stations listed in the pull down menu.... So, nothing plays, bc it shows that i have no stations...

The problem is related to the fact that pianobar in the new version changed location. So the front end tries to start it and its not where it should be.

fatalsaint 2010-02-09 14:50

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

Originally Posted by Bratag (Post 517180)
Fatal latest pianobar version doubles up the app and has a bunch of stuff in /usr/local. Any chance we can get the old one back?

The latest pianobar was done with the autobuilder instead of me doing it by hand. /usr/local is where pianobar installs itself normally if you were to build it from sources... it's all optified though... if you look in /usr/local you should just see links to pianobar into /opt/ somewhere.

I had thought that when upgrading it would have removed the other one since it was tied to the old package.. I'll have to check it out. For the old one just use the one that is in testing instead of devel.

fatalsaint 2010-02-09 14:52

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

Originally Posted by Bratag (Post 517735)
The problem is related to the fact that pianobar in the new version changed location. So the front end tries to start it and its not where it should be.

I don't put a path into the code for pianobar I don't think.. so this would surprise me... if it's in both locations.. which I gathered from you saying it "doubled up"... then it should still work from either binary - one is just unnecessary. If it's only in the one place in /opt/usr/local then that's where it's supposed to be..?

Now I'm confused.

fatalsaint 2010-02-09 15:04

Re: [application] pyPianobar (with pianobar)
 
Ok I just updated my scratchbox from the old version to the new and it *did* remove the link in /usr/bin/pianobar like it was supposed to and it's now in /usr/local/bin/pianobar which is where it normally *should* be.

It didn't clean up /etc/pianobar though which is a little annoying.. since the config location moved to /usr/local/etc/pianobar..

So if you've upgraded you can remove /etc/pianobar directory completely.

It still runs for me though.. after the upgrade:
Code:

[sbox-FREMANTLE_ARMEL: ~/pyPandora] > which pianobar                           
/usr/local/bin/pianobar                                                       
[sbox-FREMANTLE_ARMEL: ~/pyPandora] > pianobar                                 
Welcome to pianobar!                                                           
[?] Username:

So can someone run from the command line and see if it still works? Bratag - did you hard code /usr/bin/pianobar into qtPianobar? With python I was able to just "popen("pianobar")" and it pulled it out of the path instead of hard coding it.

ETA: Oh, because /etc/pianobar is a "config" file it won't remove it unless you "purge" pianobar first.. I see. I might have to put that into a postrm or something.

Bratag 2010-02-09 15:12

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

Originally Posted by fatalsaint (Post 517786)
Ok I just updated my scratchbox from the old version to the new and it *did* remove the link in /usr/bin/pianobar like it was supposed to and it's now in /usr/local/bin/pianobar which is where it normally *should* be.

It didn't clean up /etc/pianobar though which is a little annoying.. since the config location moved to /usr/local/etc/pianobar..

So if you've upgraded you can remove /etc/pianobar directory completely.

It still runs for me though.. after the upgrade:
Code:

[sbox-FREMANTLE_ARMEL: ~/pyPandora] > which pianobar                           
/usr/local/bin/pianobar                                                       
[sbox-FREMANTLE_ARMEL: ~/pyPandora] > pianobar                                 
Welcome to pianobar!                                                           
[?] Username:

So can someone run from the command line and see if it still works? Bratag - did you hard code /usr/bin/pianobar into qtPianobar? With python I was able to just "popen("pianobar")" and it pulled it out of the path instead of hard coding it.

ETA: Oh, because /etc/pianobar is a "config" file it won't remove it unless you "purge" pianobar first.. I see. I might have to put that into a postrm or something.

I actually did hard code it, I was never sure if the path would include the location of the app. That being said I hate hard coding stuff.

fatalsaint 2010-02-09 15:20

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

Originally Posted by Bratag (Post 517803)
I actually did hard code it, I was never sure if the path would include the location of the app. That being said I hate hard coding stuff.

My fault.. it didn't occur to me it break the front-ends - I should have sent you a warning first when I realized the location was going to move having it auto-build instead of having me do it.

The only thing I don't like about the new one is the config location.. I would prefer it to stay in /etc/pianobar... I don't know of any app that uses /usr/local/etc for anything.. but pianobar doesn't come with an example config so I had to add it to the CMakeList files myself and evidently I am not fulling understanding the proper way to do it.

I'm not sure what to do at this point.. having auto-builder do it is the "proper" way to build the app.. do I leave it as is and you fix qtPianobar.. or do I find some way to pass an environment variable or something to auto-builder so that it builds in /usr/ instead of /usr/local ??

Bratag 2010-02-09 15:24

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

Originally Posted by fatalsaint (Post 517818)
My fault.. it didn't occur to me it break the front-ends - I should have sent you a warning first when I realized the location was going to move having it auto-build instead of having me do it.

The only thing I don't like about the new one is the config location.. I would prefer it to stay in /etc/pianobar... I don't know of any app that uses /usr/local/etc for anything.. but pianobar doesn't come with an example config so I had to add it to the CMakeList files myself and evidently I am not fulling understanding the proper way to do it.

I'm not sure what to do at this point.. having auto-builder do it is the "proper" way to build the app.. do I leave it as is and you fix qtPianobar.. or do I find some way to pass an environment variable or something to auto-builder so that it builds in /usr/ instead of /usr/local ??

Well ultimately I would like to see nothing in the /usr tree at all and certainly no configs in /etc. All apps should go into /opt as per optification rules to avoid using rootfs space. No configs should go into /etc that are not daemons or system level software. I much prefer the config in the user space.

fatalsaint 2010-02-09 15:34

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

Originally Posted by Bratag (Post 517821)
Well ultimately I would like to see nothing in the /usr tree at all and certainly no configs in /etc. All apps should go into /opt as per optification rules to avoid using rootfs space. No configs should go into /etc that are not daemons or system level software. I much prefer the config in the user space.

Well wait.. you and I are crossing here.

Pianobar is optified by maemo-optify. /opt is not a normal area and thus not usually added to $PATH because /opt can contain several different ideas:

/opt/package
/opt/maemo/package
/opt/maemo/bin
/opt/(insert random character that the developer decided he wanted here)

etc..

It's not consistent. So what you do is you create the directory tree.. just the directories (we're talking taking up a single inode here on the rootfs).. in the rootfs for like /usr/local/bin.

Then you link the application from the optified location, to the rootfs location.. so you get:

Code:

[sbox-FREMANTLE_ARMEL: ~/pyPandora] > which pianobar                           
/usr/local/bin/pianobar                                                       
[sbox-FREMANTLE_ARMEL: ~/pyPandora] > ls -al /usr/local/bin/pianobar           
lrwxrwxrwx  1 maemo maemo 33 Feb  9 08:07 /usr/local/bin/pianobar -> /opt/maemo/
usr/local/bin/pianobar

So, the app itself is taking up space in /opt/maemo/usr/local/bin .. and something like 3 INODE's, and then a link to the other filesystem, is being taken up in Rootfs.

No real, noticeable, space is being taken on rootfs at all.

Bratag 2010-02-09 15:44

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

Originally Posted by fatalsaint (Post 517835)
Well wait.. you and I are crossing here.

Pianobar is optified by maemo-optify. /opt is not a normal area and thus not usually added to $PATH because /opt can contain several different ideas:

/opt/package
/opt/maemo/package
/opt/maemo/bin
/opt/(insert random character that the developer decided he wanted here)

etc..

It's not consistent. So what you do is you create the directory tree.. just the directories (we're talking taking up a single inode here on the rootfs).. in the rootfs for like /usr/local/bin.

Then you link the application from the optified location, to the rootfs location.. so you get:

Code:

[sbox-FREMANTLE_ARMEL: ~/pyPandora] > which pianobar                           
/usr/local/bin/pianobar                                                       
[sbox-FREMANTLE_ARMEL: ~/pyPandora] > ls -al /usr/local/bin/pianobar           
lrwxrwxrwx  1 maemo maemo 33 Feb  9 08:07 /usr/local/bin/pianobar -> /opt/maemo/
usr/local/bin/pianobar

So, the app itself is taking up space in /opt/maemo/usr/local/bin .. and something like 3 INODE's, and then a link to the other filesystem, is being taken up in Rootfs.

No real, noticeable, space is being taken on rootfs at all.

Yeah thats perfect. Sorry think we had crossed wires there :)

fatalsaint 2010-02-09 15:49

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

Originally Posted by Bratag (Post 517852)
Yeah thats perfect. Sorry think we had crossed wires there :)

Yeah.. the nice thing about maemo-optify in my rules file is it did all that for me. It however, did *not* appear to do it for my config file.. it's really in /usr/local/etc/pianobar/config.. that's not a link. Not a huge deal as the file itself is like 979 bytes or something.

So what I meant earlier was:

I'm not sure if we want to leave this as is, because this is way pianobar will be built from desktops down to little tablets... or if I should find a way to instead pass the make to /usr.

What this will do effectively, is put the app in /opt/maemo/usr/bin and link it to /usr/bin/ which is where the old version of pianobar I think was.

It'll also move the config file to /usr/etc/pianobar/.. at least unless I statically code the config to go somewhere..

Any suggestions welcome on where this package should reside.

fatalsaint 2010-02-09 16:52

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

Originally Posted by karim0028 (Post 517728)
This latest version is DOA for me anyways... It loads but i get no stations listed in the pull down menu.... So, nothing plays, bc it shows that i have no stations...

Was this regarding pyPianobar, pianobar, or qtPianobar?

Thorprime 2010-02-09 18:33

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

Originally Posted by fatalsaint (Post 517943)
Was this regarding pyPianobar, pianobar, or qtPianobar?

I can't exactly speak for karim, but that was the effect seen in pyPianobar when pianobar is not in the current $PATH.

I think the only logical fix for the binary is to leave it where the autobuilder put it and link it in /usr/bin (this is what I have done on my N900)

As for the config, the logical place to me would be "~/.pianobar/config". This is where it seems like 90% of apps keep their configs anyhow, and putting a config for a per-user app in non-user space is so 1990's :)

fatalsaint 2010-02-09 18:36

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

Originally Posted by Thorprime (Post 518084)
I can't exactly speak for karim, but that was the effect seen in pyPianobar when pianobar is not in the current $PATH.

I think the only logical fix for the binary is to leave it where the autobuilder put it and link it in /usr/bin (this is what I have done on my N900)

As for the config, the logical place to me would be "~/.pianobar/config". This is where it seems like 90% of apps keep their configs anyhow, and putting a config for a per-user app in non-user space is so 1990's :)

Yes and it gets copied there from the installed location. I can't put /home/ anything in the deb package directly or it tries to remove it when it gets uninstalled.. yes - the whole /home area.

And "~" doesn't work when you are installing a package as *root*.. you have to statically say /home/user.

So are you saying that the new build of pianobar in /usr/local/bin is *not* in the N900's local path? Because it's in my SDK so I was unaware of this.

Thorprime 2010-02-09 18:50

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

Originally Posted by fatalsaint (Post 513932)
Would appreciate a screenshot of how the new one looks with your theme...

ETA: Quick thought... what about an icon?

Here it is in green :)
http://img519.imageshack.us/img519/2...0020909244.png

I'll see what I can do about an icon. Obviously can't use the Pandora icon.... :(

Thorprime 2010-02-09 18:51

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

Originally Posted by fatalsaint (Post 518093)
So are you saying that the new build of pianobar in /usr/local/bin is *not* in the N900's local path? Because it's in my SDK so I was unaware of this.

Yes, the default $PATH is /usr/bin:/bin , and thats it.

fatalsaint 2010-02-09 19:01

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

Originally Posted by Thorprime (Post 518111)
Yes, the default $PATH is /usr/bin:/bin , and thats it.

Oh Fail.

I guess that decides what direction to take pianobar for me then... I have to find a way to make it build in /usr instead of /usr/local.

Bratag.. I'll get pianobar updated as soon as possible.. don't worry about fixing qtPianobar to the new path.

fatalsaint 2010-02-09 19:55

Re: [application] pyPianobar (with pianobar)
 
New version going to extras-devel.

1.2-6 is latest. If you manage to get 1.2-5 in the middle there somewhere it's no big deal.. only change was it was still copying the config from /usr/local/etc/ instead of /usr/etc/ in the postinst.

It should now install to /opt/maemo/usr/bin and link to /usr/bin....

Hopefully :D.

Thorprime 2010-02-09 20:26

Re: [application] pyPianobar (with pianobar)
 
1 Attachment(s)
Here is a rather inept icon concept, but it is prob better than the blue-square.

2gDSM 2010-02-10 17:55

Re: [application] pyPianobar (with pianobar)
 
I skimmed through the thread and couldn't really find a definitive answer (and bear with me as I'm not very proficient with the phone), but I get an error when trying to install "pypianobar 1.0-3".

Unable to install 'pypianobar'.
Conflict with application packages: python2.5-qt4-svg (4.6.2-maemo20091218.0)

Does anyone know what this means?

Sphinx780 2010-02-10 18:09

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

Originally Posted by 2gDSM (Post 519824)
I skimmed through the thread and couldn't really find a definitive answer (and bear with me as I'm not very proficient with the phone), but I get an error when trying to install "pypianobar 1.0-3".

Unable to install 'pypianobar'.
Conflict with application packages: python2.5-qt4-svg (4.6.2-maemo20091218.0)

Does anyone know what this means?

I had to revisit what I did while installing on my wife's phone last night. Here's what worked for me...make sure you have rootsh installed as well. I'm a total noob with xterm so I can't say if you need to update first or not. I just enjoyed the screwing around to figure it out with much help from fatalsaint as you saw his tips earlier.

in xterm:

sudo gainroot
then
apt-get update
then
apt-get install python2.5-qt4-gui

then try downloading from extras-testing
if that doesn't work, disable e-t and enable extra-devel and try downloading from there. That did the trick for me.

2gDSM 2010-02-10 18:22

Re: [application] pyPianobar (with pianobar)
 
This worked like a charm--thank you!

ffarber 2010-02-10 22:58

Re: [application] pyPianobar (with pianobar)
 
Latest version worked like a charm for me as well. Can someone remind how to vote? I think I only voted for one of pypianobar or pianobar and I want to make sure I am counted.

Thanks for doing this, it is great.

Fred

fatalsaint 2010-02-11 00:26

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

Originally Posted by ffarber (Post 520329)
Latest version worked like a charm for me as well. Can someone remind how to vote? I think I only voted for one of pypianobar or pianobar and I want to make sure I am counted.

Thanks for doing this, it is great.

Fred

You can vote for pyPianobar here and for Pianobar here.

Bratag 2010-02-12 15:58

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

Originally Posted by fatalsaint (Post 520428)
You can vote for pyPianobar here and for Pianobar here.

Voted - sorry it took me so long. Couldnt remember the myriad of passwords required on this website.

fatalsaint 2010-02-12 16:04

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

Originally Posted by Bratag (Post 523196)
Voted - sorry it took me so long. Couldnt remember the myriad of passwords required on this website.

Crap.. I knew I missed one. I updated pianobar and lost the votes and tried editing my posts here.

I'd just start using the main pianobar window here and going to the testing ones.

I'm hoping with the new testing group it'll get votes faster. The other pianobar was sort of stuck at 7 for some time.

Thanks though! If you could re-vote.. it'd be appreciated - but no big deal.. I don't expect everyone to constantly re-vote for apps. I'm not liking the current promotion system too much :(.

mrebanza 2010-02-14 05:18

Re: [application] pyPianobar (with pianobar)
 
awesome can wait to DOWNLOAD THIS APP!!!!!

fatalsaint 2010-02-14 19:58

Re: [application] pyPianobar (with pianobar)
 
Each program got new versions promoted to testing. Only changes are (mostly in preparation for the testing squad should they ever find little old me):

pianobar:
1 - Uses the CLI Icon like it's supposed to. At least, I hope/think it does. I added it to the control file but I can't use the App Manager in the SDK.. it keeps erroring on me. Maybe someone can tell me if you see a $_ icon in App Manager now.
2 - Pointed the "Bugtracker" back to here instead of the dead link that it used to be. I don't know if this will pass their qualifications for a "working" bug tracker.. but I didn't really want to go through whole bugs.maemo.org stuff unless I have to.. I monitor this thread actively and get emails - and would prefer that bugs be reported here.. so hopefully this is OK with the Testing Teams that use the QA checklist.

pyPianobar:
1 - Added an Icon. This one may not work in the App Manager, but after it's installed (may require reboot) you should get an icon for the app in your app lists now.
2 - Same bugtracker as above
3 - Fixed Last_FM username to show the current one (if exists) when changing it.

Please don't vote "down" my app if you get an error about python2.5-qt4 stuff. Come here and we'll work it out.. currently the PyQt4 bindings are in a really screwy state and the maintainer for those is working on it.. but it's kind of depressing to get a down vote on something I can't fix or do anything about :(.

Feedback welcome!

ffarber 2010-02-14 20:38

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

Originally Posted by fatalsaint (Post 520428)
You can vote for pyPianobar here and for Pianobar here.

Well, I tried to go vote but the site says promotion is cancelled for both programs and I couldn't find a vote button anywhere (nor could I find a karma button either). I did see that I could leave a comment but I didn't think that is what we wanted. I guess I am just too much of a newbie to particpate. Sorry. the development areas of this site have always been confusing (used to use an N800 a few years ago).

Fred

fatalsaint 2010-02-14 20:40

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

Originally Posted by ffarber (Post 526369)
Well, I tried to go vote but the site says promotion is cancelled for both programs and I couldn't find a vote button anywhere (nor could I find a karma button either). I did see that I could leave a comment but I didn't think that is what we wanted. I guess I am just too much of a newbie to particpate. Sorry. the development areas of this site have always been confusing (used to use an N800 a few years ago).

Fred

That is my fault for linking directly to versions.. and then updating the versions making the old links obsolete.

I would use this for pianobar and this for pyPianobar.

Click on the link by the version in "Fremantle Extras-testing free armel".

I'll go back through the thread and update my posts that I see.

ffarber 2010-02-15 22:03

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

Originally Posted by fatalsaint (Post 526374)
That is my fault for linking directly to versions.. and then updating the versions making the old links obsolete.

I would use this for pianobar and this for pyPianobar.

Click on the link by the version in "Fremantle Extras-testing free armel".

I'll go back through the thread and update my posts that I see.

That did it, thanks. I like the new icon;)

Fred


All times are GMT. The time now is 08:13.

vBulletin® Version 3.8.8