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)

karim0028 2010-02-02 00:09

Re: [application] pyPianobar (with pianobar)
 
Would really love the album art and the thumbs up/down graphics instead of the current zzz....

Oh also, a cool app like this needs a good icon instead of that plain blue box....

karim0028 2010-02-02 00:25

Re: [application] pyPianobar (with pianobar)
 
btw, does pypianobar use 2g or 3g or wifi? i have available wifi and i set my mobile wap to 2g and the songs skip alot (~5-10 seconds).... If it has wifi available does it use it? it feels like its using the phones wap.....

There is alot of skipping even when connected to 3g/wifi.... Is anyone else seeing this?

fatalsaint 2010-02-02 00:43

Re: [application] pyPianobar (with pianobar)
 
I don't code in how it access the internet. That's entirely handled by the N900. Since I don't have one I can't comment on the skipping... plays perfectly in the SDK but that's with a wireless connection.

And yes, I need a good icon if anyone is willing to donate one :). I am horrible with graphics.

ETA: And also.. I could *really* use people's opinion on the design. The faster we get everything ironed out the faster I can get it into extras.

natmaster 2010-02-02 00:55

Re: [application] pyPianobar (with pianobar)
 
Bug report: If login fails, program crashes, instead of reprompting. Now I can't use this because I entered the wrong login the first time.

fatalsaint 2010-02-02 00:58

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

Originally Posted by natmaster (Post 506069)
Bug report: If login fails, program crashes, instead of reprompting. Now I can't use this because I entered the wrong login the first time.

Back on page 3 we discuss that. You can modify the file yourself or just remove it:
Code:

rm -f /home/user/.config/pianobar/config
pyPianobar will recreate. This is fixed in my current build, I just haven't uploaded to extras-devel yet. It now re-prompts for the username/password if it fails.

I kind of want to finish up with getting the layout down, the "tired" button, and setup the "snooze" option in the menu. Once those are done I'll release 1.0 and it should be ready to push forward after I get a few testers. So we're really close.

natmaster 2010-02-02 01:17

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

Originally Posted by fatalsaint (Post 505980)
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.

Any way to use the built in theme for buttons so it doesn't clash with the rest of the experience?

fatalsaint 2010-02-02 01:26

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

Originally Posted by natmaster (Post 506093)
Any way to use the built in theme for buttons so it doesn't clash with the rest of the experience?

Not that I have found. It's of course got to be possible but I don't know how to pull the current theme colors and fill the buttons with them. These are straight graphics.. they are actually supposed to be an Orange color but my SDK is not displaying colors properly.

If I figure it out it'll get added but that's probably not going to happen before the first version gets pushed up.. I don't (personally) think it's something that should hold up the app from release.

fatalsaint 2010-02-02 15:55

Re: [application] pyPianobar (with pianobar)
 
Ok well I have all the features done at this point.
* The ZZZ finally sends the "t"
* there is a menu option for Snooze which prompts for a time in minutes (no way to cancel snooze once it's start ATM)
* closing the app works right and doesn't result in pianobar core dumps (not sure if the N900 suffered from this)
* the album art works as good as I can get it - Pandora and Slothradio seem to use different characters such as comma's, single-quote's, periods, etc.. so sometimes it doesn't find a graphic due to name mismatch, and sometimes because Slothradio just doesn't have it.
* Username/password problem is fixed

Almost ready to release it. I still would like some ideas on layout/design or if it's currently good enough as is. Still would like different buttons, especially for the ZZZ as well.

Thor, I'm thinking if you can provide me graphics that instead of the colors in the middle of the buttons make them transparent PNG's. I'm wondering if I can set the background color of the button and with a transparent PNG be able to show through. This eliminates the need for two graphics per button, and also might be the first step in me figuring out how to hook into the system colors and using those instead (so no matter the theme, it should look good with the rest of it.)

Also still need a "No Album Found" graphic to use in place of just empty blackness when it isn't able to find a proper album art.

Thorprime 2010-02-02 19:05

Re: [application] pyPianobar (with pianobar)
 
1 Attachment(s)
I've attached thumbs up/down button images as well as transparent versions of play, pause and skip

fatalsaint 2010-02-02 19:08

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

Originally Posted by Thorprime (Post 507318)
I've attached thumbs up/down button images as well as transparent versions of play, pause and skip

Awesome, thanks. I will try these as soon as I'm able..

Also - what should we do for tired? Use the Minus? Does anyone have any better ideas of being "tired" of a song?

RockCreek1 2010-02-02 19:10

Re: [application] pyPianobar (with pianobar)
 
When I used a G1, Pianobar was my favorite app. Glad it's becoming available for the N900. Thanks!

fatalsaint 2010-02-02 19:14

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

Originally Posted by RockCreek1 (Post 507326)
When I used a G1, Pianobar was my favorite app. Glad it's becoming available for the N900. Thanks!

Just to avoid confusion:

That's "Pandora Radio" ;). I use it all the time on my G1 as well. Pianobar is a Linux client that allows us to listen to Pandora Radio because Pandora itself has not made an app for the N900.

pyPianobar is a frontend to pianobar. However, when compared to the official Pandora app for the G1... pianobar and subsequently pyPianobar actually have more features. Tired being one of them, and - I don't get harassed about skipping music.

fatalsaint 2010-02-03 07:46

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

Originally Posted by Thorprime (Post 507318)
I've attached thumbs up/down button images as well as transparent versions of play, pause and skip

I'm having problems with the transparency that has me ready to through the damn computer out the window.

I assigned your new graphics to the buttons.. and according to all documentation on QT I can find - background-color should "shine through semi-transparent" parts of the image. Well.. it's not.

I get nothing but black in all of the transparent with one exception: If I CLICK on the graphic and hold the mouse button.. THEN it shows the damn background color. WTH?!?

I know it's showing the background color.. because if it's set to black, clicking on it does nothing, if it's set to white - hey.. I see white. But I cannot for the life of me get it to shine white through all the time without it having active focus. This is seriously frustrating.

Now that I have thumb icons I'm half-tempted to say screw the colors and just release it as is. I assume the new layout is good enough since nobody has really commented on it all... that just tells me must be fine.

Thorprime 2010-02-03 18:45

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

Originally Posted by fatalsaint (Post 508055)
I get nothing but black in all of the transparent with one exception: If I CLICK on the graphic and hold the mouse button.. THEN it shows the damn background color. WTH?!?

Did you set the ":pressed" background-color? It sounds to me like only the pressed color is being set (perhaps a bug in Maemo's QT implementation?). I wonder if setting both the regular and the pressed would fix it.

Also, I think you mentioned earlier that you added 4 menu's, but in some of your testing only 2 showed? Just letting you know on my N900 only Station/Create and Station/Delete show. There are no options for things like username.

Finally, I think the images I sent earlier have the thumbs up and down facing the same direction, which will probably look bad in the app. When I get home tonight I'll go ahead and send you a set of the thumbs-up buttons with the hand facing the other way, as well as with a pre-highlighted version that you can use if the bg-color part still doesn't work.

fatalsaint 2010-02-03 18:58

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

Originally Posted by Thorprime (Post 509085)
Did you set the ":pressed" background-color? It sounds to me like only the pressed color is being set (perhaps a bug in Maemo's QT implementation?). I wonder if setting both the regular and the pressed would fix it.

Nope.. but I'll try setting both and see what happens. It's very frustrating. All my googling with QT and transparency shows very little because it seems most people are just fine using transparent PNG. I just suck, obviously.

Quote:

Also, I think you mentioned earlier that you added 4 menu's, but in some of your testing only 2 showed? Just letting you know on my N900 only Station/Create and Station/Delete show. There are no options for things like username.
Yup.. same thing I'm seeing in the SDK... so the SDK is not broke. Dangit... everything shows on Desktop Linux, *and* the N810.. so it's something with N900's implementation of the menu system. Very annoying. Now I know it needs to be fixed, though.

Thanks again for the graphics. You do a better job than I can with those. Also, for the highlight color - I'm thinking just do white.. instead of orange. Orange is more theme-specific, and since I can't seem to pull the theme-colors I think just a straight Black/White app is more universal and shouldn't clash with much.

fatalsaint 2010-02-04 07:52

Re: [application] pyPianobar (with pianobar)
 
I've submitted pyPianobar-1.0-1 to the repositories and it should be up within the hour or so. I'm going to let you guys use this one for a few days to see how it goes.

Thor - If you get me the other thumbs up/down I'll push out a -2 before I go to promote to Extras-Testing. I want some feedback on this for a few days before I bother. If anyone could provide me a screenshot of it running in an N900 that would also be appreciated.. I updated the OP with screenshots that I can do but the N900 isn't one of them.

The menu I think will work now... 5 options in there. Username/Password, LastFM Username/Password, Station Create and Delete, and Snooze. The "-" sends the tired signal for a song. Album Art is retrieved from SlothRadio covers... the search on SlothRadio is very picky, so not all albums will be found, unfortunately.

Comments/Feedback desperately needed :). Enjoy.

Thorprime 2010-02-04 18:51

Re: [application] pyPianobar (with pianobar)
 
1 Attachment(s)
I've attached some more images for pianobar GUI use (Bratag, feel free to use them as well).

Here are a couple screen shots of the current version on my N900

http://img51.imageshack.us/img51/689...0020410304.png
http://img691.imageshack.us/img691/9...0020410312.png

Here are a few issues.
1: Your current username is not pre-poplated in the username screen.

2: Clicking out of the username menu to cancel crashes the app. (Or at least it quits, not sure where the crashlogs would be if it had crashed)
Closing other menus this way such as "station/create" doesn't cause the issue.

3: White border on active buttons (probably a Qt issue you may be aware of)

4:Probably should change "Snooze" to "Sleep" or "sleep timer", as this is what it is called on most TV's, ect. (But the feature works great! Awesome)


Just wanted to thank you again for putting this thing together. The issues above are fairly minor, but the crash issue should prob be fixed before pushing the app to testing.

fatalsaint 2010-02-04 18:59

Re: [application] pyPianobar (with pianobar)
 
Thank you for the excellent report and screenshots Thor!! Very awesome.


Quote:

Originally Posted by Thorprime (Post 510826)
Here are a few issues.
1: Your current username is not pre-poplated in the username screen.

Easily fixed and good point. I really ought to add for it to restart pianobar with the new username/password (for lastfm too) so that you don't have to close out and re-open to use the new account.

Quote:

2: Clicking out of the username menu to cancel crashes the app. (Or at least it quits, not sure where the crashlogs would be if it had crashed)
Closing other menus this way such as "station/create" doesn't cause the issue.
Ahhhh... I think this was me. I added it as a failsafe because it's (normally) a reactive prompt to pianobar asking for a username.. if you don't provide one there's no point in continuing. I just connected the same methods to the menu button.. guess a check is in order.. Thanks.

Quote:

3: White border on active buttons (probably a Qt issue you may be aware of)
This is a result of the my transparency battle with QT. The button refuses to just show the underlying color with a transparent GIF unless it's "clicked"... so my work around was to manually set the "down" attribute on the button making it look like it's constantly clicked. It worked a lot better than having no colors at all I thought and didn't really mind the border.... although - come to think of it - I might be able to just change the border color and see if that "blends" it so-to-speak.

Quote:

4:Probably should change "Snooze" to "Sleep" or "sleep timer", as this is what it is called on most TV's, ect. (But the feature works great! Awesome)
Yeah.. I wasn't sure what to use. I'll change it to "Sleep Mode". I was also wondering if I should add a timer somewhere that you can watch it count down.. but don't know where to put it on the UI.

Again - BIG Thanks for Feedback. I enjoy seeing others getting use out of my apps. Thanks for additional icons as well.. I'll check them out.

fatalsaint 2010-02-04 19:20

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

Originally Posted by Thorprime (Post 510826)
I've attached some more images for pianobar GUI use (Bratag, feel free to use them as well).

Thanks for No Image Found! Skipped-white is completely white.. I see nothing but a blank white image?

Also.. thumbs-up-right looks cool but thumbs-up-trans still points the other way :D. Can I get a transparent of the right one?

Appreciate this!

Thorprime 2010-02-04 19:32

Re: [application] pyPianobar (with pianobar)
 
3 Attachment(s)
Quote:

Originally Posted by fatalsaint (Post 510869)
Thanks for No Image Found! Skipped-white is completely white.. I see nothing but a blank white image?

Also.. thumbs-up-right looks cool but thumbs-up-trans still points the other way :D. Can I get a transparent of the right one?


oops, here are the correct images.

daperl 2010-02-05 05:01

Re: [application] pyPianobar (with pianobar)
 
3 Attachment(s)
Quote:

Originally Posted by fatalsaint (Post 505980)
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.

Maybe you can steal these images from Sonata. I've attached a tar.gz with the original files.

Attachment 6883
Attachment 6884

fatalsaint 2010-02-05 06:11

Re: [application] pyPianobar (with pianobar)
 
Those arent bad... not sure how image copyright would work though. Since I think Thor's are original works and he has given permission for their use.. they are probably going to be the ones I use. Just seems safer.

Thanks for the feedback and assistance.. any and all thoughts are welcome!

daperl 2010-02-05 07:22

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

Originally Posted by fatalsaint (Post 511377)
Those arent bad... not sure how image copyright would work though. Since I think Thor's are original works and he has given permission for their use.. they are probably going to be the ones I use. Just seems safer.

Yeah, I don't know, but here's a copy of Sonata's license:

Code:

Sonata, an elegant GTK+ client for the Music Player Daemon
Copyright 2006-2008 Scott Horowitz <stonecrest@gmail.com>

This file is part of Sonata.

Sonata is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

Sonata is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Anyway, I'm in the process of porting it. I'm much more into controlling music with my tablets, than I am actually playing music on them. So, eventually I plan on running pianobar like mpd, and then using a variation of a Sonata-like mpc gui to control it. I might also add playback abilities for personal use. But that's probably a Pandora no-no.

karim0028 2010-02-05 17:18

Re: [application] pyPianobar (with pianobar)
 
Hi,

I'm trying to install the latest package and i am getting a conflict...

"Conflict With application packages: python2.5-qt4-gui(4.7-maemo4)

I'm on a N900

Thorprime 2010-02-05 17:45

Re: [application] pyPianobar (with pianobar)
 
With regard to the Sonata image, Sonata is GPLv3 so the only way you can use it is if you official make pyPianobar either GPLv3 or Apache2 licensed (and of course have the source publicly availible).

Otherwise, not so much.

fatalsaint 2010-02-05 17:57

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

Originally Posted by karim0028 (Post 512113)
Hi,

I'm trying to install the latest package and i am getting a conflict...

"Conflict With application packages: python2.5-qt4-gui(4.7-maemo4)

I'm on a N900

I'm not sure.. what happens if you try to install python2.5-qt4-gui directly?

fatalsaint 2010-02-05 17:59

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

Originally Posted by Thorprime (Post 512150)
With regard to the Sonata image, Sonata is GPLv3 so the only way you can use it is if you official make pyPianobar either GPLv3 or Apache2 licensed (and of course have the source publicly availible).

Otherwise, not so much.

I'm pretty sure I flagged mine as GPL. Did so in the Debian packaging anyway. And the source code is the same thing as the app to run it since it's python.

I didn't specify what version of GPL though. But, just because Sonata is GPL does that mean the images couldn't be copyrighted?

karim0028 2010-02-05 18:57

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?

Works thanks! Looking alot better! Hey BTW, could you add some color to the UI?

karim0028 2010-02-05 18:58

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

Originally Posted by fatalsaint (Post 512166)
I'm pretty sure I flagged mine as GPL. Did so in the Debian packaging anyway. And the source code is the same thing as the app to run it since it's python.

I didn't specify what version of GPL though. But, just because Sonata is GPL does that mean the images couldn't be copyrighted?

Usually GPL means you can do anything with it as long as its open source, code, graphics and all....

fatalsaint 2010-02-05 19:05

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

Originally Posted by karim0028 (Post 512235)
Hey BTW, could you add some color to the UI?

I just can't win... I use orange and get told it conflicts with the default theme's... I use black/white to be generic and get told I need color! :D

I'm hoping someday I'll figure out how to pull colors from whatever theme you're using and use those. Don't know how to do that yet.. but now that I got transparent icons working (somewhat) decently then the framework is there for it.. just need a way to dynamically grab the colors.

Thorprime 2010-02-05 19:14

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

Originally Posted by fatalsaint (Post 512166)
I'm pretty sure I flagged mine as GPL. Did so in the Debian packaging anyway. And the source code is the same thing as the app to run it since it's python.

I didn't specify what version of GPL though. But, just because Sonata is GPL does that mean the images couldn't be copyrighted?

Well the issue is GPLv3 is not compatible with GPLv1/2 directly.
http://www.gnu.org/licenses/gpl-faq....3Compatibility

Usually the images fall under the same license and the code.

Quote:

Originally Posted by karim0028
Usually GPL means you can do anything with it as long as its open source, code, graphics and all....

Somewhat. The easy way to look at is:
BSD/MIT licenses say Do anything you want with my work so long as you credit me (no restrictions on your license, doesn't even have to be open source)

GPL/Apache say Do what you want to as long as you release all the derivative works under the same license.

You should prob read this whole page, especially the requirement to be able to display the license to the user.
http://www.gnu.org/licenses/quick-guide-gplv3.html

fatalsaint 2010-02-05 19:17

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

Originally Posted by Thorprime (Post 512253)
Well the issue is GPLv3 is not compatible with GPLv2 directly. Usually the images fall under the same license and the code.



Somewhat. The easy way to look at is:
BSD/MIT licenses say Do anything you want with my work so long as you credit me (no restrictions on your license, doesn't even have to be open source)

GPL/Apache say Do what you want to as long as you release all the derivative works under the same license.

Don't forget LGPL... some sort of bastardized step-child if hypothetically GPL and BSD got drunk together and found there way to Vegas...

daperl 2010-02-05 19:24

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

Originally Posted by fatalsaint (Post 512245)
I just can't win... I use orange and get told it conflicts with the default theme's... I use black/white to be generic and get told I need color! :D

I'm hoping someday I'll figure out how to pull colors from whatever theme you're using and use those. Don't know how to do that yet.. but now that I got transparent icons working (somewhat) decently then the framework is there for it.. just need a way to dynamically grab the colors.

Every time the theme changes, the symlink:

/etc/hildon/theme

points to the current theme.

Inside that directory is a file called:

colors.config

For the "Harmony" theme, it looks like this:

Code:

[Colors]

DefaultTextColor=#ffffff
SecondaryTextColor=#bababa
ActiveTextColor=#26abff
DisabledTextColor=#8e8e8e
PaintedTextColor=#000000

ReversedTextColor=#141414
ReversedSecondaryTextColor=#707070
ReversedActiveTextColor=#0072c2
ReversedDisabledTextColor=#949494
ReversedPaintedTextColor=#ffffff

DefaultBackgroundColor=#181818
DarkerBackgroundColor=#101010
ReversedBackgroundColor=#ffffff
SelectionColor=#30a8f8
ReversedSelectionColor=#68b8f8

ContentBackgroundColor=#000000
ContentFrameColor=#000000
ContentSelectionColor=#ffffff

TitleTextColor=#ffffff
ButtonTextColor=#ffffff
ButtonTextPressedColor=#ffffff
ButtonTextDisabledColor=#8c8c8c

AccentColor1=#41b5ff
AccentColor2=#004e80
AccentColor3=#005890
AttentionColor=#ff1919

NotificationBackgroundColor=#f8c858
NotificationTextColor=#181101
NotificationSecondaryTextColor=#4a3503

Also, the "alpha" and "beta" themes seem to be their own monsters when in a pinch. Lots of good stuff in "alpha" and "beta."

Thorprime 2010-02-05 19:25

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

Originally Posted by fatalsaint (Post 512259)
Don't forget LGPL...

Yeh.... We don't talk about the LGPL :)

fatalsaint 2010-02-05 19:57

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

Originally Posted by daperl (Post 512266)
<snip EXCELLENT info>

Holy mother of WIN post!!!!!!!! You rock! Thanks!!!!

fatalsaint 2010-02-06 22:16

Re: [application] pyPianobar (with pianobar)
 
New version sent. It now should be pulling "ActiveTextColor" from the theme's config, and defaulting to white if not found.

If another color seems better suited someone let me know.. colors are a little off in my SDK.

All of the below issues have been fixed, please test them:
Quote:

Originally Posted by karim0028 (Post 512235)
Hey BTW, could you add some color to the UI?

Quote:

Originally Posted by Thorprime (Post 510826)
Here are a few issues.
1: Your current username is not pre-poplated in the username screen.

2: Clicking out of the username menu to cancel crashes the app. (Or at least it quits, not sure where the crashlogs would be if it had crashed)
Closing other menus this way such as "station/create" doesn't cause the issue.

3: White border on active buttons (probably a Qt issue you may be aware of)

4:Probably should change "Snooze" to "Sleep" or "sleep timer", as this is what it is called on most TV's, ect. (But the feature works great! Awesome)

Also, the transparency is working properly now.. no more "down" buttons that was more of a hack than anything.

Please provide feedback!

fatalsaint 2010-02-06 22:34

Re: [application] pyPianobar (with pianobar)
 
Oops.. just realized I didn't add the "No Image Found."

Another new upload will be coming soon..

fatalsaint 2010-02-06 23:25

Re: [application] pyPianobar (with pianobar)
 
Ok, latest version: 1.0-3, has all fixes + No Image Found when an album cover is not found.

Thorprime 2010-02-07 03:57

Re: [application] pyPianobar (with pianobar)
 
Works and looks great!
+1 vote to move to extras-testing

fatalsaint 2010-02-07 04:13

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

Originally Posted by Thorprime (Post 513926)
Works and looks great!
+1 vote to move to extras-testing

Would appreciate a screenshot of how the new one looks with your theme... in my SDK it's supposed to be "blue" for the alpha but shows orange.. it's really weird. Hard to tell what it really looks like.

If no one complains by tomorrow I'll throw it into testing.

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


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

vBulletin® Version 3.8.8