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 2010-12-20 23:19

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by TiagoTiago (Post 900326)
Btw, i've just hit the MB limit for this month and got my connection speed downgraded till January, now pyRadio keeps pausing, how can i increase the buffer size so it will play ininterruptly even when under a slow connection?

Also, could you make it use more than one connection at time so while one song is playing it will already be downloading the next random song to not pause much between songs please?

Short answer on this one is No. All of the buffering/downloading of the song is done by the Media backend, in this case MAFW, and not by pyRadio itself. It started with libmad/libao with pianobar, then gstreamer, now MAFW. Buffering has gotten better along the way but there's no real way to "make" MAFW do anything since, AFAIK, it's completely undocumented.

On another note: Someone want to tell me why I'm a dick? (reads tags..)

The Arsonist 2010-12-24 19:06

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 900922)
On another note: Someone want to tell me why I'm a dick? (reads tags..)

WTF is up with that ****? You're the furthest from a dick. Good catch. That needs to be removed.

TiagoTiago 2011-01-02 21:02

Re: [application] pyRadio (Pandora)
 
After playing for a while it will eventually stop playing (somtimes hitting the next button or switching radios makes it play again), running from the console i spotted the following:

Code:

...
MAFW POSITION 0
MAFW POSITION 0
MAFW POSITION 0
Getting next song..
Error: com.savagebeast.radio.api.protocol.xmlrpc.RadioXmlRpcException: 192.168.160.72|1293972267356|AUTH_INVALID_TOKEN|Invalid auth token
Code: 1
Traceback (most recent call last):
  File "./pyRadio.py", line 265, in <lambda>
    self.stimer.singleShot(500, lambda: self.player.getMoreSongs(self.curStation, self.c.format))
  File "/opt/pyRadio/radioplayer.py", line 102, in getMoreSongs
    fragment = self.pandora.getFragment( station, format )
  File "/opt/pyRadio/libpiano/pandora.py", line 273, in getFragment
    url = parsed[i]["audioURL"]
TypeError: string indices must be integers
PLAY
MAFW STATE CHANGED 3
MAFW PROPERTY CHANGED transport-actions  <type 'str'>
MAFW PLAYBACK 4876832 None <ctypes.LP__GError object at 0x44e7c850>
MAFW METADATA CHANGED is-seekable [False]
MAFW STATE CHANGED 0
MAFW PROPERTY CHANGED transport-actions  <type 'str'>
MAFW POSITION 0
MAFW POSITION 0
MAFW POSITION 0
...

dunno if it is related

fatalsaint 2011-01-02 22:26

Re: [application] pyRadio (Pandora)
 
Yeah that's actually one I was expecting already. What happens is Pandora has an expiration on your original ticket and so if you play for a few hours you get signed out. All it should require is calling the authentication functions again I just haven't implemented the trap for that error as I didn't have any output to look at. (I've never listened to Pandora for that long).

Thanks for the snippet, I'll put it to use when I can.

TiagoTiago 2011-01-02 22:58

Re: [application] pyRadio (Pandora)
 
That one really is the right one? I was kinda sleeping when the music went away and only went looking for an error msg on the console some time later....

shadowjig 2011-01-26 21:46

Re: [application] pyRadio (Pandora)
 
Are there any web gui's for pianobar? I'm looking to control pianobar on a headless server using a web app.

I've attemped to start writing one, but I'm hitting road blocks when trying to launch an binary from PHP.

jmc8501 2011-02-03 03:56

Re: [application] pyRadio (Pandora)
 
Two "requests," although they may have already been mentioned here, I haven't read through the entire thread...

1) Any chances for a widget, similar to the media player widget? I think a similar sized one could fit all the functionality

2) I love this app, the functionality is great, very useful, etc. but I can't help but feel that it is lacking aesthetically. Although many here may feel appearance is unimportant, I think it makes thigs a great deal more enjoyable and lends itself to ui improvements. Any chances for an update there?

fatalsaint 2011-02-05 02:49

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by shadowjig (Post 929366)
Are there any web gui's for pianobar? I'm looking to control pianobar on a headless server using a web app.

I've attemped to start writing one, but I'm hitting road blocks when trying to launch an binary from PHP.

I don't know.. the only one close to that I know of is the one for the X-box.

Quote:

Originally Posted by jmc8501 (Post 934697)
Two "requests," although they may have already been mentioned here, I haven't read through the entire thread...

1) Any chances for a widget, similar to the media player widget? I think a similar sized one could fit all the functionality

2) I love this app, the functionality is great, very useful, etc. but I can't help but feel that it is lacking aesthetically. Although many here may feel appearance is unimportant, I think it makes thigs a great deal more enjoyable and lends itself to ui improvements. Any chances for an update there?

I suck at UI design, as I've said. The UI it has is totally user-contributed. I am up for changes if someone gets me the design and graphics. At some point I might theme it so all the options are available.

As for a widget.. maybe someday.. but not for a while and may not be worth it. Depends how popular the N900 still is when I have time again.

Jef91 2011-02-12 14:15

Re: [application] pyRadio (Pandora)
 
Anyone else having issues with pyRadio in the last few days? Mine has been able to "authenticate" but is unable to pull down a song list. Been this way for the last few days now.

~Jeff

jsharper 2011-02-12 18:36

Re: [application] pyRadio (Pandora)
 
Quote:

Originally Posted by fatalsaint (Post 900922)
Short answer on this one is No. All of the buffering/downloading of the song is done by the Media backend, in this case MAFW, and not by pyRadio itself. It started with libmad/libao with pianobar, then gstreamer, now MAFW. Buffering has gotten better along the way but there's no real way to "make" MAFW do anything since, AFAIK, it's completely undocumented.

Just a random thought, not a specific request for you to go recode the app or anything... I've been thinking about how to have a program like pyRadio have more control over things like buffering and pre-fetch while still retaining the benefits of using MAFW. How about if the app does the actual data retrieval from the Pandora service, and then exposes the music stream to the MAFW framework via a local http server (ie give MAFW a url like http://localhost:12345/stream.mpg).


All times are GMT. The time now is 04:25.

vBulletin® Version 3.8.8