Re: [Banshee-List] Open URI from Banshee Extension



As far as I can remember (sorry, at the moment in the process of
setting up my environment again) you'd rather have to find the
TrackInfo/DatabaseTrackInfo object in the MusicLibrary source and then
do a TrackInfo.Play()

So say in words of your second example:

Banshee.Collection.TrackInfo currTrack =
ServiceManager.PlayerEngine.CurrentTrack;
currTrack.Play();

...

or create a new DatabaseTrackInfo, which I wouldn't think was much of
a good idea, as you'd want the track to play that is already in the
library, right?

BR

Frank

2010/9/30 nstamato <nstamato gmail com>:
>
> Hello,
>
> I'm writing an Extension for Banshee where one can control Banshee from his
> phone. Right now I have it set up so that a user can select a song on his
> phone, my application sends the URI of the song to my extension in Banshee
> and then I was hoping that Banshee would play the selected song by calling:
>
> ServiceManager.PlayerEngine.Open(new SafeUri(s));
>
> where s is the String with the URI of the selected song. This doesn't seem
> to work. Just as a check to make sure I'm not passing a corrupt URI, I
> tried:
>
> Banshee.Collection.TrackInfo currTrack =
> ServiceManager.PlayerEngine.CurrentTrack;
> SafeUri s = currTrack.Uri;
> ServiceManager.PlayerEngine.Open(s);
>
> which should just start again the song that's playing, but that's not
> working either. I'm probably following the wrong approach for doing what I
> would like.
>
> Any ideas?
>
> thanks
> --
> View this message in context: http://old.nabble.com/Open-URI-from-Banshee-Extension-tp29841249p29841249.html
> Sent from the Banshee mailing list archive at Nabble.com.
>
> _______________________________________________
> banshee-list mailing list
> banshee-list gnome org
> http://mail.gnome.org/mailman/listinfo/banshee-list  (unsubscribe here)
>


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