[Banshee-List] How to detect whether a track is skipped



Hello everyone,

I'm writing an extension for douban.fm, an internet radio station�similar�to Pandora. The station tunes the music to the listener's taste by user feedback - "like", "dislike" or "skip". My extension plays the radio in Banshee and I have to distinguish whether a song played to the end or the user hit "Next" button and skipped it.

I looked at Banshee.MediaEngine.PlayerEvent and tried the following events:�RequestNextTrack,�StartOfStream,�EndOfStream. My code is like this:

� � � � � � � � � � ServiceManager.PlayerEngine.ConnectEvent(Next, PlayerEvent.RequestNextTrack);
� � � � � � � � � � ServiceManager.PlayerEngine.ConnectEvent(FinishSong, PlayerEvent.EndOfStream);
� � � � � � � � � � ServiceManager.PlayerEngine.ConnectEvent(StartSong, PlayerEvent.StartOfStream);

RequestNextTrack does not seem to distinguish between the two cases.�StartOfStream is triggered when a song starts playing.�I thought EndOfStream would be triggered when a song is played to the end, but it didn't. So I can't find a solution to my problem.

Can anyone help?

Thanks.

Best regards,

--
Chen Tao


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