maemo.org - Talk

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

fatalsaint 2011-07-18 05:01

Re: [application] pyRadio (Pandora)
 
Anytime you 'zoom' in on little graphics like that you get pixelation without doing some image post processing and for album art it's not worth it. If you know HTML you can mess with it, it's in pyRadio.py line 284. I wanted to make the album size dynamic so that when the buttons or stuff shift with long album names the album art still fills 100% of the Album Graphic area.. thats why I have a 100% table in there, the table always fills the whole box.

self.ui.albumArt.setHtml("<table width='100%' height='100%'><tr><td vertical-align='middle' style='text-align: center'><img style='width: 80%; height: 100%' src='"+art+"'></td></tr></table>")

Addison 2011-07-18 06:08

Re: [application] pyRadio (Pandora)
 
Changing some of the coloring landed me this screen when first starting PyRadio.

http://img705.imageshack.us/img705/771/12313272.png

So yeah, it just hangs like that.

The only work around I have found is by logging in wrong first then logging a second time correctly.

Weird. :)

So anyway, there's no way to keep the aspect ratio of the cover art?

fatalsaint 2011-07-18 06:12

Re: [application] pyRadio (Pandora)
 
It's probably possible if you instead build a QGraphic by downloading the graphic from the URL first, process the size, figure aspect, and scale it accordingly, and then paint it in something other than a QWebKit.... but - it wasn't worth the effort in my mind.

Addison 2011-07-18 06:41

Re: [application] pyRadio (Pandora)
 
Okay.

I'm not trying to bust on you... Believe me, I love this dandy little app. :)

Here's the thing, after this I promise to drop it.

I changed the background color for the album art to red.

That area looks square. In Vagalume, I believe it does the cover art as an 215x215 image.

In yours though, it looks more like a rectangle hence the weirder distortion.

http://img543.imageshack.us/img543/3315/68176987.png

I guess I don't follow if your code says fill it 100% why it's not coming out more like a square image.

Anyway, just don't hate me because of my unrelenting questioning. :D

fatalsaint 2011-07-18 06:43

Re: [application] pyRadio (Pandora)
 
Change this:

style='width: 80%; height: 100%'

to

style='width: 100%; height: 100%'

Should get you your square. And before you ask.. I forget why I am doing an 80% by 100% rectangle. I think it was because having the border of the album art right next to the buttons looked funny to me.

Addison 2011-07-18 07:05

Re: [application] pyRadio (Pandora)
 
Thank you Saint!

Yeah, for me, it looks cleaner now than before. :)

http://img801.imageshack.us/img801/2894/70824586.png

Thanks again for all the time you spent on this. :)

slvr32 2011-07-18 16:59

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 1052887)
Thanks Slvr and Dan for the information.

Addison, I'm sure Slvr is correct but really it doesn't matter. I handle the volume through OSSO with that button and since there is currently no other way to manipulate the audio inside pyradio (slider bar, plus/minus buttons/etc) ultimately the solution would be the same regardless of how we up the volume.
...

Once again, thanks to fatalsaint for all of the time and effort spent in keeping pyradio alive, and all of the support he provides here :)

I think I (just) googled 'maemo pcm', and stumbled across a canola (also written in python, IIRC) discussion, where it sounds like they manage to access the PCM setting (possibly via alsa hooks?).

I'm not trying to feed the 'volume control' fire, but it's nice to know that Canola source might have some volume control hints that may or may not be useful for the pyRadio implementation.

Edit: forgot the link...

https://garage.maemo.org/pipermail/c...ay/000145.html

Addison 2011-07-18 22:34

Re: [application] pyRadio (Pandora)
 
I did a slight tweak with the previous image that I posted last.

If you set the background cover art color to black, you get a nice frame around the album image.

That's all I have to say............. for now. :D

fatalsaint 2011-07-21 03:09

Re: [application] pyRadio (Pandora)
 
3.9 is going up to the repo's. Updated the Create Stations piece so that it works again.

Can I get more votes on 3.7 so that I can promote that to extras to at least get a 'working' version to extras before I promote 3.9 and start this mess all over again?

Thanks

Addison 2011-07-21 04:33

Re: [application] pyRadio (Pandora)
 
Adding and deleting stations are all good for the Diablo version. :)

Is there any way to tweak the code to show the time played for a song instead of time left on it?

Thanks for the update, Saint!


All times are GMT. The time now is 09:05.

vBulletin® Version 3.8.8