Re: [Rhythmbox-devel] start player with 'play queue' as source



Ok,

I can probably check if the player is playing using another source.

If it is I can make it stop doing that, switch the source. and start the player again.

I am a bit clumsy around writing plugins; new to it.

How do I switch the source to the "play queue"?


The end goal is that I am writing an interface for a player on an embedded system (no keyboard, mouse etc) just a touch screen. From that interface I want to select tracks, send them to the "play queue" and have them played without having to go back to the mainwindow.


so something like?

# regardless if playing or not
shell.props.shell_player.stop()
# change the source to be the "play queue"
shell.props.shell_player.set_playing_source(shell.props.playqueue_source)
shell.props.sourcelist.select(shell.props.playqueue_source)
# start the player again
shell.props.shell_player.play()


The only thing (I think) is I am not sure about is how to select the new source (the "play queue") so that I can start the player there (in python)

So...  how do I select the "play queue" to be the new source for the player?


thanks,

Ron

Jonathan Matthew wrote:
On Sat, Jan 2, 2010 at 11:04 AM, Ron Croonenberg <ronc depauw edu> wrote:
Hello,

I am trying to figure out how to get the player started (in python) with as
source for playing songs/tracks the 'play queue'

I don't think there's a (good) way to do that presently. You can
probably make it work in some conditions, though. What's the end goal
here?

I tried something like this:

shell.props.shell_player.set_playing_source(shell.props.playqueue_source)

It might be better to stop playback instead. Then, selecting a source
and starting playback will cause that to become the playing source.

shell.props.sourcelist.select(shell.props.playqueue_source)

This will crash if the play queue is visible as a side pane rather
than a source.

shell.props.shell_player.play()

shell.props.shell_player.playpause() might work better here.
shell_player.play() only works if there's already something selected
for playback, so it's not very useful.
_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel gnome org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel

--
==================================================================
main(p){printf(p,34,p="main(p){printf(p,34,p=%c%s%c,34); }",34); }
==================================================================
Ron Croonenberg                   |
                                  | Phone: 1 765 658 4761
Lab Instructor &                  | Fax:   1 765 658 4732
        Technology Coordinator    |
                                  |
Department of Computer Science    | e-mail: ronc DePauw edu
DePauw University                 |
275 Julian Science & Math Center  |
602 South College Ave.            |
Greencastle, IN  46135            |
==================================================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]